aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/vimeo.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-10-12 01:48:06 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-10-12 01:48:06 +0800
commita093cfc78b584a6e5dbc4bbca525f9e40af9522d (patch)
tree7e701d8d989b28a8983d717139a7b8560ceb4e9e /youtube_dl/extractor/vimeo.py
parent6f20b65e728ee30d9b987a39932a3355501f7f67 (diff)
[vimeo:review] Fix extraction (#10900)
Now Vimeo Review videos uses React. Thanks @davekaro for analyzing the problem!
Diffstat (limited to 'youtube_dl/extractor/vimeo.py')
-rw-r--r--youtube_dl/extractor/vimeo.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/youtube_dl/extractor/vimeo.py b/youtube_dl/extractor/vimeo.py
index a46c5c282..b566241cc 100644
--- a/youtube_dl/extractor/vimeo.py
+++ b/youtube_dl/extractor/vimeo.py
@@ -837,6 +837,7 @@ class VimeoReviewIE(VimeoBaseInfoExtractor):
'params': {
'videopassword': 'holygrail',
},
+ 'skip': 'video gone',
}]
def _real_initialize(self):
@@ -844,9 +845,10 @@ class VimeoReviewIE(VimeoBaseInfoExtractor):
def _get_config_url(self, webpage_url, video_id, video_password_verified=False):
webpage = self._download_webpage(webpage_url, video_id)
- config_url = self._html_search_regex(
- r'data-config-url="([^"]+)"', webpage, 'config URL',
- default=NO_DEFAULT if video_password_verified else None)
+ data = self._parse_json(self._search_regex(
+ r'window\s*=\s*_extend\(window,\s*({.+?})\);', webpage, 'data',
+ default=NO_DEFAULT if video_password_verified else '{}'), video_id)
+ config_url = data.get('vimeo_esi', {}).get('config', {}).get('configUrl')
if config_url is None:
self._verify_video_password(webpage_url, video_id, webpage)
config_url = self._get_config_url(