[vimeo:album] Fix extraction for albums with number of videos multiple to page size...
authorSergey M․ <dstftw@gmail.com>
Fri, 19 Mar 2021 22:45:36 +0000 (05:45 +0700)
committerSergey M․ <dstftw@gmail.com>
Fri, 19 Mar 2021 22:47:26 +0000 (05:47 +0700)
youtube_dl/extractor/vimeo.py

index bd2663fe0488507dcbdb665dadeeaa13d580109e..955651bec372de0fba00df5a5108023360eda0b0 100644 (file)
@@ -939,11 +939,15 @@ class VimeoAlbumIE(VimeoBaseInfoExtractor):
         }
         if hashed_pass:
             query['_hashed_pass'] = hashed_pass
-        videos = self._download_json(
-            'https://api.vimeo.com/albums/%s/videos' % album_id,
-            album_id, 'Downloading page %d' % api_page, query=query, headers={
-                'Authorization': 'jwt ' + authorization,
-            })['data']
+        try:
+            videos = self._download_json(
+                'https://api.vimeo.com/albums/%s/videos' % album_id,
+                album_id, 'Downloading page %d' % api_page, query=query, headers={
+                    'Authorization': 'jwt ' + authorization,
+                })['data']
+        except ExtractorError as e:
+            if isinstance(e.cause, compat_HTTPError) and e.cause.code == 400:
+                return
         for video in videos:
             link = video.get('link')
             if not link: