我試圖使用this script使用Python下載YouTube視頻。通過Python腳本下載YouTube視頻
目前我使用這個如下
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.
謝謝你,我沒有在該字符串之前使用雙引號。也可以在不同的文件夾中下載。我的意思是第一個箱子文件夾,然後下載它 – user2134226 2011-05-29 05:35:21
在Linux中,你只需運行'mkdir foo'並將'-o'設置爲'foo /%(標題)...' – Blender 2011-05-29 05:37:34
其實我想製作腳本會自動收集來自YouTube的播放列表並在特定文件夾中下載播放列表。我認爲我需要在調用此腳本播放列表之前調用mkdir – user2134226 2011-05-29 05:40:39