]>
Commit | Line | Data |
---|---|---|
b78531a3 | 1 | from .common import InfoExtractor |
2 | ||
3 | ||
4 | class Formula1IE(InfoExtractor): | |
46358f64 | 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', | |
b78531a3 | 9 | 'info_dict': { |
46358f64 | 10 | 'id': '6060988138001', |
2342733f | 11 | 'ext': 'mp4', |
b78531a3 | 12 | 'title': 'Race highlights - Spain 2016', |
46358f64 | 13 | 'timestamp': 1463332814, |
14 | 'upload_date': '20160515', | |
15 | 'uploader_id': '6057949432001', | |
277c7465 | 16 | }, |
46358f64 | 17 | 'add_ie': ['BrightcoveNew'], |
18 | } | |
19 | BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/6057949432001/S1WMrhjlh_default/index.html?videoId=%s' | |
b78531a3 | 20 | |
21 | def _real_extract(self, url): | |
46358f64 | 22 | bc_id = self._match_id(url) |
b78531a3 | 23 | return self.url_result( |
46358f64 | 24 | self.BRIGHTCOVE_URL_TEMPLATE % bc_id, 'BrightcoveNew', bc_id) |