2016-03-14 54 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>