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