1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-06-02 10:29:28 +00:00

Added support for playlist start/end parameters.

This commit is contained in:
Paweł Paprota 2011-01-28 10:29:20 +01:00
parent 6608d7fe62
commit fd174ae83d

View file

@ -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: