2017-06-17 51 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個視頻。

相關問題