1
0
mirror of https://github.com/l1ving/youtube-dl synced 2024-11-22 21:12:50 +08:00

Fix playlists with size 50i ∀ i∉ℕ (Closes #782)

This commit is contained in:
Philipp Hagemeister 2013-04-18 07:28:24 +02:00
parent d22f65413a
commit feba604e92

View File

@ -1778,9 +1778,13 @@ class YoutubePlaylistIE(InfoExtractor):
self._downloader.report_error(u'Invalid JSON in API response: ' + compat_str(err)) self._downloader.report_error(u'Invalid JSON in API response: ' + compat_str(err))
return return
if not 'feed' in response or not 'entry' in response['feed']: if 'feed' not in response:
self._downloader.report_error(u'Got a malformed response from YouTube API') self._downloader.report_error(u'Got a malformed response from YouTube API')
return return
if 'entry' not in response['feed']:
# Number of videos is a multiple of self._MAX_RESULTS
break
videos += [ (entry['yt$position']['$t'], entry['content']['src']) videos += [ (entry['yt$position']['$t'], entry['content']['src'])
for entry in response['feed']['entry'] for entry in response['feed']['entry']
if 'content' in entry ] if 'content' in entry ]