aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2021-03-20 05:45:36 +0700
committerSergey M․ <dstftw@gmail.com>2021-03-20 05:47:26 +0700
commit7e79ba7dd6e6649dd2ce3a74004b2044f2182881 (patch)
tree4025163cce0f5bf662c25f820fcf7665ec06e3f2
parentfa6bf0a7112e83d36567072985d56440bb34de72 (diff)
[vimeo:album] Fix extraction for albums with number of videos multiple to page size (closes #28486)
-rw-r--r--youtube_dl/extractor/vimeo.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/youtube_dl/extractor/vimeo.py b/youtube_dl/extractor/vimeo.py
index bd2663fe0..955651bec 100644
--- a/youtube_dl/extractor/vimeo.py
+++ b/youtube_dl/extractor/vimeo.py
@@ -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: