mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-14 12:23:19 +00:00
86e5f3ed2e
Using https://github.com/asottile/pyupgrade 1. `__future__` imports and `coding: utf-8` were removed 2. Files were rewritten with `pyupgrade --py36-plus --keep-percent-format` 3. f-strings were cherry-picked from `pyupgrade --py36-plus` Extractors are left untouched (except removing header) to avoid unnecessary merge conflicts
25 lines
938 B
Python
25 lines
938 B
Python
from .common import InfoExtractor
|
|
|
|
|
|
class Formula1IE(InfoExtractor):
|
|
_VALID_URL = r'https?://(?:www\.)?formula1\.com/en/latest/video\.[^.]+\.(?P<id>\d+)\.html'
|
|
_TEST = {
|
|
'url': 'https://www.formula1.com/en/latest/video.race-highlights-spain-2016.6060988138001.html',
|
|
'md5': 'be7d3a8c2f804eb2ab2aa5d941c359f8',
|
|
'info_dict': {
|
|
'id': '6060988138001',
|
|
'ext': 'mp4',
|
|
'title': 'Race highlights - Spain 2016',
|
|
'timestamp': 1463332814,
|
|
'upload_date': '20160515',
|
|
'uploader_id': '6057949432001',
|
|
},
|
|
'add_ie': ['BrightcoveNew'],
|
|
}
|
|
BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/6057949432001/S1WMrhjlh_default/index.html?videoId=%s'
|
|
|
|
def _real_extract(self, url):
|
|
bc_id = self._match_id(url)
|
|
return self.url_result(
|
|
self.BRIGHTCOVE_URL_TEMPLATE % bc_id, 'BrightcoveNew', bc_id)
|