diff options
author | Sergey M․ <dstftw@gmail.com> | 2016-07-02 02:44:37 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2016-07-02 02:44:37 +0700 |
commit | 14ff6baa0ee3fa0ead2e2b460017abe5e853647c (patch) | |
tree | 1dc287f3ee95f77751a66270c8feb776c1d53db4 /youtube_dl/extractor | |
parent | bb08101ec4a8728677ee23466608ab6aa65cbb4f (diff) |
[fusion] Improve
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r-- | youtube_dl/extractor/fusion.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/youtube_dl/extractor/fusion.py b/youtube_dl/extractor/fusion.py index 771abcdb1..b4ab4cbb7 100644 --- a/youtube_dl/extractor/fusion.py +++ b/youtube_dl/extractor/fusion.py @@ -5,10 +5,9 @@ from .ooyala import OoyalaIE class FusionIE(InfoExtractor): - _VALID_URL = r'https?://(?:www\.)?fusion\.net/video/\d+/(?P<id>[\w-]+)' - _TEST = { + _VALID_URL = r'https?://(?:www\.)?fusion\.net/video/(?P<id>\d+)' + _TESTS = [{ 'url': 'http://fusion.net/video/201781/u-s-and-panamanian-forces-work-together-to-stop-a-vessel-smuggling-drugs/', - 'md5': '55c3dd61d2b96dc17c4ab6711d02a39e', 'info_dict': { 'id': 'ZpcWNoMTE6x6uVIIWYpHh0qQDjxBuq5P', 'ext': 'mp4', @@ -16,14 +15,21 @@ class FusionIE(InfoExtractor): 'description': 'md5:0cc84a9943c064c0f46b128b41b1b0d7', 'duration': 140.0, }, + 'params': { + 'skip_download': True, + }, 'add_ie': ['Ooyala'], - } + }, { + 'url': 'http://fusion.net/video/201781', + 'only_matching': True, + }] def _real_extract(self, url): display_id = self._match_id(url) webpage = self._download_webpage(url, display_id) - ooyala_code = self._search_regex(r'data-video-id="([^"]{32})"', - webpage, 'ooyala code') + ooyala_code = self._search_regex( + r'data-video-id=(["\'])(?P<code>.+?)\1', + webpage, 'ooyala code', group='code') return OoyalaIE._build_url_result(ooyala_code) |