diff options
author | Remita Amine <remitamine@gmail.com> | 2020-11-19 13:12:58 +0100 |
---|---|---|
committer | Remita Amine <remitamine@gmail.com> | 2020-11-19 13:13:33 +0100 |
commit | 2dbb45ae82836699486d434cfb6d902920bab66e (patch) | |
tree | b95cf09b8fc009135b63c5871e45b3ca551d81dc /youtube_dl/extractor | |
parent | 4fe190df705d16c66fc3e7b2d798ff14ebbc9878 (diff) | |
download | youtube-dl-2dbb45ae82836699486d434cfb6d902920bab66e.tar.xz |
[vimeo:album] fix extraction(closes #27079)
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r-- | youtube_dl/extractor/vimeo.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/youtube_dl/extractor/vimeo.py b/youtube_dl/extractor/vimeo.py index 421795b94..cfd04d50c 100644 --- a/youtube_dl/extractor/vimeo.py +++ b/youtube_dl/extractor/vimeo.py @@ -946,10 +946,13 @@ class VimeoAlbumIE(VimeoBaseInfoExtractor): def _real_extract(self, url): album_id = self._match_id(url) - webpage = self._download_webpage(url, album_id) - viewer = self._parse_json(self._search_regex( - r'bootstrap_data\s*=\s*({.+?})</script>', - webpage, 'bootstrap data'), album_id)['viewer'] + viewer = self._download_json( + 'https://vimeo.com/_rv/viewer', album_id, fatal=False) + if not viewer: + webpage = self._download_webpage(url, album_id) + viewer = self._parse_json(self._search_regex( + r'bootstrap_data\s*=\s*({.+?})</script>', + webpage, 'bootstrap data'), album_id)['viewer'] jwt = viewer['jwt'] album = self._download_json( 'https://api.vimeo.com/albums/' + album_id, |