1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-24 19:22:06 +00:00

[vimeo:review] Fix extraction (#10900)

Now Vimeo Review videos uses React. Thanks @davekaro for analyzing the
problem!
This commit is contained in:
Yen Chi Hsuan 2016-10-12 01:48:06 +08:00
parent 6f20b65e72
commit a093cfc78b
No known key found for this signature in database
GPG key ID: 3FDDD575826C5C30
2 changed files with 6 additions and 3 deletions

View file

@ -5,6 +5,7 @@ Core
* [Makefile] Support for GNU make < 4 is fixed; BSD make dropped (#9387) * [Makefile] Support for GNU make < 4 is fixed; BSD make dropped (#9387)
Extractors Extractors
* [vimeo:review] Fix extraction (#10900)
* [nhl] Correctly handle invalid formats (#10713) * [nhl] Correctly handle invalid formats (#10713)
* [footyroom] Fix extraction (#10810) * [footyroom] Fix extraction (#10810)
* [abc.net.au:iview] Fix for standalone (non series) videos (#10895) * [abc.net.au:iview] Fix for standalone (non series) videos (#10895)

View file

@ -837,6 +837,7 @@ class VimeoReviewIE(VimeoBaseInfoExtractor):
'params': { 'params': {
'videopassword': 'holygrail', 'videopassword': 'holygrail',
}, },
'skip': 'video gone',
}] }]
def _real_initialize(self): def _real_initialize(self):
@ -844,9 +845,10 @@ class VimeoReviewIE(VimeoBaseInfoExtractor):
def _get_config_url(self, webpage_url, video_id, video_password_verified=False): def _get_config_url(self, webpage_url, video_id, video_password_verified=False):
webpage = self._download_webpage(webpage_url, video_id) webpage = self._download_webpage(webpage_url, video_id)
config_url = self._html_search_regex( data = self._parse_json(self._search_regex(
r'data-config-url="([^"]+)"', webpage, 'config URL', r'window\s*=\s*_extend\(window,\s*({.+?})\);', webpage, 'data',
default=NO_DEFAULT if video_password_verified else None) 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: if config_url is None:
self._verify_video_password(webpage_url, video_id, webpage) self._verify_video_password(webpage_url, video_id, webpage)
config_url = self._get_config_url( config_url = self._get_config_url(