Skip to content

Commit

Permalink
[vimeo:album] Fix extraction for albums with number of videos multipl…
Browse files Browse the repository at this point in the history
…e to page size (closes ytdl-org#28486)
  • Loading branch information
dstftw committed Mar 19, 2021
1 parent fa6bf0a commit 7e79ba7
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions youtube_dl/extractor/vimeo.py
Original file line number Diff line number Diff line change
Expand Up @@ -939,11 +939,15 @@ def _fetch_page(self, album_id, authorization, hashed_pass, page):
}
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:
Expand Down

0 comments on commit 7e79ba7

Please sign in to comment.