目前我使用如下
youtube-dl "http://www.youtube.com/watch?v=dvsdgyuv"
在他们编写的文档中我可以使用这些文档
ID: The sequence will be replaced by the vIDeo IDentifIEr.url: The sequence will be replaced by the vIDeo URL.uploader: The sequence will be replaced by the nickname of the person who uploaded the vIDeo.upload_date: The sequence will be replaced by the upload date in YYYYMMDD format.Title: The sequence will be replaced by the literal vIDeo Title.sTitle: The sequence will be replaced by a simplifIEd vIDeo Title,restricted to Alphanumeric characters and dashes.ext: The sequence will be replaced by the appropriate extension (like flv or mp4).epoch: The sequence will be replaced by the Unix epoch when creating the file.autonumber: The sequence will be replaced by a five-digit number that will be increased with each download,starting at zero.`enter code here`
他们还没有写过如何使用它.
如何使用视频文件名与标题相同?
他们告诉使用它,但我不知道如何在命令行中使用它.
%(Title)s-%(ID)s.%(ext)s.解决方法 在文档的底部,它说明了如何:
The -o option allows users to
indicate a template for the output
file names. The basic usage is not
to set any template arguments when
downloading a single file,like in
youtube-dl -o funny_vIDeo.flv
“http://some/vIDeo”. However,it may
contain special sequences that will be
replaced when downloading each vIDeo.
The special sequences have the format %(name)s. To clarify,that’s
a percent symbol followed by a name in
parenthesis,followed by a lowercase
S. Allowed names are: …
您可以像这样运行命令以使用这些特殊输出参数:
youtube-dl "http://www.youtube.com/watch?v=dvsdgyuv" -o "%(Title)s-%(ID)s.%(ext)s."总结
以上是内存溢出为你收集整理的通过Python脚本下载YouTube视频全部内容,希望文章能够帮你解决通过Python脚本下载YouTube视频所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)