]> jfr.im git - yt-dlp.git/blame - yt_dlp/extractor/bundesliga.py
[ie/matchtv] Fix extractor (#10190)
[yt-dlp.git] / yt_dlp / extractor / bundesliga.py
CommitLineData
f48ab881
F
1from .common import InfoExtractor
2from .jwplatform import JWPlatformIE
3
4
5class BundesligaIE(InfoExtractor):
6 _VALID_URL = r'https?://(?:www\.)?bundesliga\.com/[a-z]{2}/bundesliga/videos(?:/[^?]+)?\?vid=(?P<id>[a-zA-Z0-9]{8})'
7 _TESTS = [
8 {
9 'url': 'https://www.bundesliga.com/en/bundesliga/videos?vid=bhhHkKyN',
10 'md5': '8fc3b25cd12440e3a8cdc51f1493849c',
11 'info_dict': {
12 'id': 'bhhHkKyN',
13 'ext': 'mp4',
14 'title': 'Watch: Alphonso Davies and Jeremie Frimpong head-to-head',
15 'thumbnail': 'https://cdn.jwplayer.com/v2/media/bhhHkKyN/poster.jpg?width=720',
16 'upload_date': '20220928',
17 'duration': 146,
18 'timestamp': 1664366511,
add96eb9 19 'description': 'md5:803d4411bd134140c774021dd4b7598b',
20 },
f48ab881
F
21 },
22 {
23 'url': 'https://www.bundesliga.com/en/bundesliga/videos/latest-features/T8IKc8TX?vid=ROHjs06G',
add96eb9 24 'only_matching': True,
f48ab881
F
25 },
26 {
27 'url': 'https://www.bundesliga.com/en/bundesliga/videos/goals?vid=mOG56vWA',
add96eb9 28 'only_matching': True,
29 },
f48ab881
F
30 ]
31
32 def _real_extract(self, url):
33 video_id = self._match_id(url)
34 return self.url_result(f'jwplatform:{video_id}', JWPlatformIE, video_id)