[ie/dplay] Fix extractors (#10471)
[yt-dlp3.git] / yt_dlp / extractor / bundesliga.py
blob29f8f941576c0f25fa2ff650d2e98e0e1ffb2a50
1 from .common import InfoExtractor
2 from .jwplatform import JWPlatformIE
5 class 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 = [
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,
19 'description': 'md5:803d4411bd134140c774021dd4b7598b',
23 'url': 'https://www.bundesliga.com/en/bundesliga/videos/latest-features/T8IKc8TX?vid=ROHjs06G',
24 'only_matching': True,
27 'url': 'https://www.bundesliga.com/en/bundesliga/videos/goals?vid=mOG56vWA',
28 'only_matching': True,
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)