gpt4 book ai didi

youtube-dl,如何在出错后恢复下载?

转载 作者:行者123 更新时间:2023-12-03 05:10:41 25 4
gpt4 key购买 nike

我正在使用 youtube-dl从 Lynda 下载视频(我有一个帐户)。
在列表中的第 40 个视频之后,我收到此错误:

ERROR: Unable to download JSON metadata: HTTP Error 403: Forbidden


有没有办法“重新启动”下载,这样我就不必再次从第一个文件开始?说只是告诉它从文件 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

最佳答案

最好用-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 Music 上的前 100 首歌曲
youtube-dl -ciw --playlist-items 1-100 --extract-audio --audio-format mp3 --restrict-filenames https://www.youtube.com/playlist?list=PLDcnymzs18LWrKzHmzrGH1JzLBqrHi3xQ

我猜,YouTube 音乐播放列表的实际链接随时间而变化。您可以转到播放列表并复制。检查链接是指向播放列表还是单个视频的一种方法是播放列表链接中包含“播放列表”关键字。

关于youtube-dl,如何在出错后恢复下载?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35982269/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com