瀏覽代碼

[youtube] Add test for multi page list of playlists

Sergey M․ 9 年之前
父節點
當前提交
e568c2233e
共有 1 個文件被更改,包括 10 次插入2 次删除
  1. 10 2
      youtube_dl/extractor/youtube.py

+ 10 - 2
youtube_dl/extractor/youtube.py

@@ -1764,14 +1764,22 @@ class YoutubeUserPlaylistsIE(YoutubePlaylistsBaseInfoExtractor):
     _VALID_URL = r'https?://(?:\w+\.)?youtube\.com/user/(?P<id>[^/]+)/playlists'
     _VALID_URL = r'https?://(?:\w+\.)?youtube\.com/user/(?P<id>[^/]+)/playlists'
     IE_NAME = 'youtube:user:playlists'
     IE_NAME = 'youtube:user:playlists'
 
 
-    _TEST = {
+    _TESTS = [{
         'url': 'http://www.youtube.com/user/ThirstForScience/playlists',
         'url': 'http://www.youtube.com/user/ThirstForScience/playlists',
         'playlist_mincount': 4,
         'playlist_mincount': 4,
         'info_dict': {
         'info_dict': {
             'id': 'ThirstForScience',
             'id': 'ThirstForScience',
             'title': 'Thirst for Science',
             '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):
 class YoutubeSearchIE(SearchInfoExtractor, YoutubePlaylistIE):