]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/fusion.py
25e284d46f228151447b88c20811d4e37742a0d6
1 from __future__
import unicode_literals
3 from .common
import InfoExtractor
4 from .ooyala
import OoyalaIE
7 class FusionIE(InfoExtractor
):
8 _VALID_URL
= r
'https?://(?:www\.)?fusion\.(?:net|tv)/video/(?P<id>\d+)'
10 'url': 'http://fusion.tv/video/201781/u-s-and-panamanian-forces-work-together-to-stop-a-vessel-smuggling-drugs/',
12 'id': 'ZpcWNoMTE6x6uVIIWYpHh0qQDjxBuq5P',
14 'title': 'U.S. and Panamanian forces work together to stop a vessel smuggling drugs',
15 'description': 'md5:0cc84a9943c064c0f46b128b41b1b0d7',
19 'skip_download': True,
23 'url': 'http://fusion.tv/video/201781',
24 'only_matching': True,
27 def _real_extract(self
, url
):
28 display_id
= self
._match
_id
(url
)
29 webpage
= self
._download
_webpage
(url
, display_id
)
31 ooyala_code
= self
._search
_regex
(
32 r
'data-ooyala-id=(["\'])(?P
<code
>(?
:(?
!\
1).)+)\
1',
33 webpage, 'ooyala code
', group='code
')
35 return OoyalaIE._build_url_result(ooyala_code)