]> jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/formula1.py
[adobepass] Add MSO Sling TV (#596)
[yt-dlp.git] / yt_dlp / extractor / formula1.py
1 # coding: utf-8
2 from __future__ import unicode_literals
3
4 from .common import InfoExtractor
5
6
7 class Formula1IE(InfoExtractor):
8 _VALID_URL = r'https?://(?:www\.)?formula1\.com/en/latest/video\.[^.]+\.(?P<id>\d+)\.html'
9 _TEST = {
10 'url': 'https://www.formula1.com/en/latest/video.race-highlights-spain-2016.6060988138001.html',
11 'md5': 'be7d3a8c2f804eb2ab2aa5d941c359f8',
12 'info_dict': {
13 'id': '6060988138001',
14 'ext': 'mp4',
15 'title': 'Race highlights - Spain 2016',
16 'timestamp': 1463332814,
17 'upload_date': '20160515',
18 'uploader_id': '6057949432001',
19 },
20 'add_ie': ['BrightcoveNew'],
21 }
22 BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/6057949432001/S1WMrhjlh_default/index.html?videoId=%s'
23
24 def _real_extract(self, url):
25 bc_id = self._match_id(url)
26 return self.url_result(
27 self.BRIGHTCOVE_URL_TEMPLATE % bc_id, 'BrightcoveNew', bc_id)