]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/formula1.py
322c41e5afcb20935f4f7841ccb03303d5476f65
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
7 class Formula1IE(InfoExtractor
):
8 _VALID_URL
= r
'https?://(?:www\.)?formula1\.com/content/fom-website/en/video/\d{4}/\d{1,2}/(?P<id>.+?)\.html'
10 'url': 'http://www.formula1.com/content/fom-website/en/video/2016/5/Race_highlights_-_Spain_2016.html',
11 'md5': '8c79e54be72078b26b89e0e111c0502b',
13 'id': 'JvYXJpMzE6pArfHWm5ARp5AiUmD-gibV',
15 'title': 'Race highlights - Spain 2016',
20 def _real_extract(self
, url
):
21 display_id
= self
._match
_id
(url
)
22 webpage
= self
._download
_webpage
(url
, display_id
)
23 ooyala_embed_code
= self
._search
_regex
(
24 r
'data-videoid="([^"]+)"', webpage
, 'ooyala embed code')
25 return self
.url_result(
26 'ooyala:%s' % ooyala_embed_code
, 'Ooyala', ooyala_embed_code
)