[youtube] apply the fix for lists with number of videos multiple of _MAX_RESULTS...
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Wed, 18 Sep 2013 21:00:32 +0000 (23:00 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Wed, 18 Sep 2013 21:00:32 +0000 (23:00 +0200)
Copied from the playlist extractor.

youtube_dl/extractor/youtube.py

index f227e208634464fcff44c25b83aa4249b5afdb68..23a8097c5a91f3409688d26006cf4b26b785139e 100644 (file)
@@ -1005,6 +1005,9 @@ class YoutubeUserIE(InfoExtractor):
                 response = json.loads(page)
             except ValueError as err:
                 raise ExtractorError(u'Invalid JSON in API response: ' + compat_str(err))
+            if 'entry' not in response['feed']:
+                # Number of videos is a multiple of self._MAX_RESULTS
+                break
 
             # Extract video identifiers
             ids_in_page = []