2016-03-14 53 views
6

我正在使用youtube-dl從Lynda下載視頻(我有一個帳戶)。youtube-dl - 錯誤後恢復下載

經過約在列表中的第40視頻我收到此錯誤:

錯誤:無法下載JSON元數據:HTTP錯誤403:禁止

有沒有辦法來「重啓」的下載,所以我不必再從第一個文件開始?說只是告訴它從文件41開始?

這是我用來下載命令:

./youtube-dl --cookies cookies.txt --username <myusername> --password <mypassword> --sleep-interval 200 -o "%(autonumber)s - %(title)s.%(ext)s」 http://www.lynda.com/C-tutorials/C-Essential-Training/188207-2.html 

感謝您的任何意見

+0

對於其他用戶: - 在我看來,這答案會更好,因爲它適用於使用自定義命令(例如只保存提取的音頻文件)的情況。 https://askubuntu.com/a/709258/438449 – saurabheights

回答

8

可以使用繼續下載:

youtube-dl <link_to_video> -c 

或者

youtube-dl <link_to_video> --continue 

另外,youtu是-DL大多繼續下載儘可能

+0

不錯,這甚至適用於播放列表 – max

+0

很高興它可以幫助 – Beevk

0

如果你有403禁止錯誤,然後下載,你必須移除YouTube-DL的高速緩存目錄,然後重試下載... here is the trick

3

這是很好的使用下載播放列表時組合-ciw

-i, --ignore-errors Continue on download errors, for example to skip 
         unavailable videos in a playlist 
-w, --no-overwrites Do not overwrite files 
-c, --continue   Force resume of partially downloaded files. 
         By default, youtube-dl will resume downloads if possible. 

下面的示例下載YouTube上的音樂最受歡迎的100首歌曲

youtube-dl -ciw --playlist-items 1-100 --extract-audio --audio-format mp3 --restrict-filenames https://www.youtube.com/playlist?list=PLDcnymzs18LWrKzHmzrGH1JzLBqrHi3xQ 
0

可以恢復與-c選項的視頻。舉例來說,如果你以前開始使用下載:

youtube-dl <some_youtube_URL> 

您可能,如果它被停止或中斷,簡歷,下載後用:

youtube-dl -c <some_youtube_URL>