From feba604e9256b48972dfe4b5658ada4b300581cd Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Thu, 18 Apr 2013 07:28:24 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20playlists=20with=20size=2050i=20=E2=88=80?= =?UTF-8?q?=20i=E2=88=89=E2=84=95=20(Closes=20#782)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- youtube_dl/InfoExtractors.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py index cf31970ef..bac3a747d 100755 --- a/youtube_dl/InfoExtractors.py +++ b/youtube_dl/InfoExtractors.py @@ -1778,9 +1778,13 @@ class YoutubePlaylistIE(InfoExtractor): self._downloader.report_error(u'Invalid JSON in API response: ' + compat_str(err)) 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') 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']) for entry in response['feed']['entry'] if 'content' in entry ]