mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-08-21 22:03:55 -07:00
Merge 8a9b79aba1
into 9c228928b6
This commit is contained in:
commit
ced8cdab6d
1 changed files with 10 additions and 0 deletions
10
youtube-dl
10
youtube-dl
|
@ -2582,7 +2582,12 @@ class YoutubePlaylistIE(InfoExtractor):
|
|||
|
||||
playliststart = self._downloader.params.get('playliststart', 1) - 1
|
||||
playlistend = self._downloader.params.get('playlistend', -1)
|
||||
reverseorder = self._downloader.params.get('reverseorder', True)
|
||||
|
||||
video_ids = video_ids[playliststart:playlistend]
|
||||
|
||||
if reverseorder:
|
||||
video_ids.reverse()
|
||||
|
||||
for id in video_ids:
|
||||
self._youtube_ie.extract('http://www.youtube.com/watch?v=%s' % id)
|
||||
|
@ -2664,6 +2669,7 @@ class YoutubeUserIE(InfoExtractor):
|
|||
all_ids_count = len(video_ids)
|
||||
playliststart = self._downloader.params.get('playliststart', 1) - 1
|
||||
playlistend = self._downloader.params.get('playlistend', -1)
|
||||
reverseorder = self._downloader.params.get('reverseorder', True)
|
||||
|
||||
if playlistend == -1:
|
||||
video_ids = video_ids[playliststart:]
|
||||
|
@ -2672,6 +2678,9 @@ class YoutubeUserIE(InfoExtractor):
|
|||
|
||||
self._downloader.to_screen(u"[youtube] user %s: Collected %d video ids (downloading %d of them)" %
|
||||
(username, all_ids_count, len(video_ids)))
|
||||
|
||||
if reverseorder:
|
||||
video_ids.reverse()
|
||||
|
||||
for video_id in video_ids:
|
||||
self._youtube_ie.extract('http://www.youtube.com/watch?v=%s' % video_id)
|
||||
|
@ -4306,6 +4315,7 @@ def parseOpts():
|
|||
dest='playliststart', metavar='NUMBER', help='playlist video to start at (default is 1)', default=1)
|
||||
selection.add_option('--playlist-end',
|
||||
dest='playlistend', metavar='NUMBER', help='playlist video to end at (default is last)', default=-1)
|
||||
selection.add_option('--reverse-order', action='store_true', dest='reverseorder', help='reverse download order for user pages/playlists', default=False)
|
||||
selection.add_option('--match-title', dest='matchtitle', metavar='REGEX',help='download only matching titles (regex or caseless sub-string)')
|
||||
selection.add_option('--reject-title', dest='rejecttitle', metavar='REGEX',help='skip download for matching titles (regex or caseless sub-string)')
|
||||
selection.add_option('--max-downloads', metavar='NUMBER', dest='max_downloads', help='Abort after downloading NUMBER files', default=None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue