如何使用 youtube-dl 脚本从播放列表中的某个索引开始下载?

How to use youtube-dl script to download starting from some index in a playlist?

如何使用youtube-dl下载播放列表从开始一定数量到上限?

我尝试在代码中使用:

youtube-dl -o '~/Documents/%(playlist)s/%(chapter_number)s - %(chapter)s/%(playlist_index)s - %(title)s.%(ext)s' URL

中间停了下来。我想从索引第 i 个编号的视频重新开始处理,而不是从头开始。

youtube-dl --help, contains:

Video Selection:
  --playlist-start NUMBER          Playlist video to start at (default is 1)
  --playlist-end NUMBER            Playlist video to end at (default is last)
  --playlist-items ITEM_SPEC       Playlist video items to download. Specify
                                   indices of the videos in the playlist
                                   separated by commas like: "--playlist-items
                                   1,2,5,8" if you want to download videos
                                   indexed 1, 2, 5, 8 in the playlist. You can
                                   specify range: "--playlist-items
                                   1-3,7,10-13", it will download the videos
                                   at index 1, 2, 3, 7, 10, 11, 12 and 13.

因此,选项 --playlist-start NUMBER 应该可以帮助您从中间开始播放列表,由 NUMBER 指定。

我的播放列表中共有 135 个视频。我已经成功下载了其中的 38 个。所以我手动使用了这个命令。

youtube-dl --playlist-start 39 -u uname@gmail.com -p mypassword https://www.udemy.com/learn-ethical-hacking-from-scratch/learn/v4/content

正在下载我剩余的 97 个视频。