mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-07 16:17:18 +08:00
Added support for playlist start/end parameters.
This commit is contained in:
parent
6608d7fe62
commit
fd174ae83d
11
youtube-dl
11
youtube-dl
@ -2187,7 +2187,16 @@ class YoutubeUserIE(InfoExtractor):
|
||||
|
||||
pagenum += 1
|
||||
|
||||
self._downloader.to_screen("[youtube] user %s: Collected %d video ids" % (username, len(video_ids)))
|
||||
all_ids_count = len(video_ids)
|
||||
playliststart = self._downloader.params.get('playliststart', 1) - 1
|
||||
playlistend = self._downloader.params.get('playlistend', -1)
|
||||
|
||||
if playlistend == -1:
|
||||
video_ids = video_ids[playliststart:]
|
||||
else:
|
||||
video_ids = video_ids[playliststart:playlistend]
|
||||
|
||||
self._downloader.to_screen("[youtube] user %s: Collected %d video ids (downloading %d of them)" % (username, all_ids_count, len(video_ids)))
|
||||
|
||||
for video_id in video_ids:
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user