这是我的代码:
call(['youtube-dl', '-i', '--extract-audio', '--audio-format mp3','-w','ytsearch:'+song ,'-o '+song2file(song)+'.%(ext)s'], shell=False)
在注意:这是此代码的实现:youtuble-dl -i --extract-audio --audio-format mp3 -w ytsearch:Wham Bam -o WhamBam.%(ext)s
其中song=whambam,当我运行这个cmd时,它工作得很好,但是python实现不起作用。在
运行它时返回给我:
youtube-dl: error: no such option: --audio-format
作为解决方案的一部分,最好像这样正确格式化字符串:
那就叫它吧
^{pr2}$这已经解决了您所描述的问题,但在-o选项上似乎仍然存在问题。 请记住正确格式化字符串,不要粗心大意。在
相关问题 更多 >
编程相关推荐