]> jfr.im git - yt-dlp.git/blame - yt_dlp/extractor/formula1.py
[youtube] Add `thirdParty` to agegate clients (#577)
[yt-dlp.git] / yt_dlp / extractor / formula1.py
CommitLineData
b78531a3 1# coding: utf-8
2from __future__ import unicode_literals
3
4from .common import InfoExtractor
5
6
7class Formula1IE(InfoExtractor):
46358f64 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',
b78531a3 12 'info_dict': {
46358f64 13 'id': '6060988138001',
2342733f 14 'ext': 'mp4',
b78531a3 15 'title': 'Race highlights - Spain 2016',
46358f64 16 'timestamp': 1463332814,
17 'upload_date': '20160515',
18 'uploader_id': '6057949432001',
277c7465 19 },
46358f64 20 'add_ie': ['BrightcoveNew'],
21 }
22 BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/6057949432001/S1WMrhjlh_default/index.html?videoId=%s'
b78531a3 23
24 def _real_extract(self, url):
46358f64 25 bc_id = self._match_id(url)
b78531a3 26 return self.url_result(
46358f64 27 self.BRIGHTCOVE_URL_TEMPLATE % bc_id, 'BrightcoveNew', bc_id)