[cleanup] Misc (#8968)
[yt-dlp.git] / yt_dlp / extractor / bundesliga.py
blobe76dd58ddbb39ef1dbad3139b68e7e7c9aeaf756
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)