[youtube] Add test for multi page list of playlists
authorSergey M․ <dstftw@gmail.com>
Sat, 21 Nov 2015 23:03:23 +0000 (05:03 +0600)
committerSergey M․ <dstftw@gmail.com>
Sat, 21 Nov 2015 23:03:23 +0000 (05:03 +0600)
youtube_dl/extractor/youtube.py

index 8352ad1dae46b68559409d05e27865b023ca9d44..4a0ff6e9c82810143a450394ed0849493d3cd942 100644 (file)
@@ -1764,14 +1764,22 @@ class YoutubeUserPlaylistsIE(YoutubePlaylistsBaseInfoExtractor):
     _VALID_URL = r'https?://(?:\w+\.)?youtube\.com/user/(?P<id>[^/]+)/playlists'
     IE_NAME = 'youtube:user:playlists'
 
-    _TEST = {
+    _TESTS = [{
         'url': 'http://www.youtube.com/user/ThirstForScience/playlists',
         'playlist_mincount': 4,
         'info_dict': {
             'id': 'ThirstForScience',
             'title': 'Thirst for Science',
         },
-    }
+    }, {
+        # with "Load more" button
+        'url': 'http://www.youtube.com/user/igorkle1/playlists?view=1&sort=dd',
+        'playlist_mincount': 70,
+        'info_dict': {
+            'id': 'igorkle1',
+            'title': 'Игорь Клейнер',
+        },
+    }]
 
 
 class YoutubeSearchIE(SearchInfoExtractor, YoutubePlaylistIE):