Python ~ Youtube-dl: Error: No Such Option: --audio-format
Here is my code : call(['youtube-dl', '-i', '--extract-audio', '--audio-format mp3','-w','ytsearch:'+song ,'-o '+song2file(song)+'.%(ext)s'], shell=False) Note:This is an impleme
Solution 1:
as part of solution, it better to format your string properly like this:
arg= ['-i', '--extract-audio', '--audio-format mp3','-w','ytsearch:'+song ,'-o
'+song2file(song)+'.%(ext)s'];yt-arg= " ".join(str(x) for x in arg);
then call it
subprocess.call(['youtube-dl', yt-arg], shell=False)
this already solve the problem you describe but it seems still have issue on the -o option. please remember to format your string properly, not carelessly.
Post a Comment for "Python ~ Youtube-dl: Error: No Such Option: --audio-format"