]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[vimeo:review] Fix extraction (#10900)
authorYen Chi Hsuan <yan12125@gmail.com>
Tue, 11 Oct 2016 17:48:06 +0000 (01:48 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Tue, 11 Oct 2016 17:48:06 +0000 (01:48 +0800)
Now Vimeo Review videos uses React. Thanks @davekaro for analyzing the
problem!

ChangeLog
youtube_dl/extractor/vimeo.py

index 49488c8881d09bcafbce3b6168019238e8f8a969..3e16a2cb3d539b908d359db90d202e6693adf8a4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@ Core
 * [Makefile] Support for GNU make < 4 is fixed; BSD make dropped (#9387)
 
 Extractors
+* [vimeo:review] Fix extraction (#10900)
 * [nhl] Correctly handle invalid formats (#10713)
 * [footyroom] Fix extraction (#10810)
 * [abc.net.au:iview] Fix for standalone (non series) videos (#10895)
index a46c5c282cc0d50033c30b1a35ac9e48e1ba7aed..b566241cc31810ee8a9496b4c538dbf2505f962d 100644 (file)
@@ -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(