2017-06-17 134 views
1

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

我试图在代码中使用:

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

,并在中间停了下来。我想从编号为i的视频重新开始该过程,而不是从头开始重新开始。

回答

7

youtube-dl --help包含:

...

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规定。

+0

非常感谢你,它帮了我很多..但是我怎么算一些特定的视频呢?这下载我正确的视频,但从1号,而不是从我插入的NUMBER号码 – hadar

0

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

youtube-dl --playlist-start 39 -u [email protected] -p mypassword https://www.udemy.com/learn-ethical-hacking-from-scratch/learn/v4/content 

它下载我剩余的97个视频。

相关问题