]>
Commit | Line | Data |
---|---|---|
f48ab881 F |
1 | from .common import InfoExtractor |
2 | from .jwplatform import JWPlatformIE | |
3 | ||
4 | ||
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 = [ | |
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, | |
19 | 'description': 'md5:803d4411bd134140c774021dd4b7598b' | |
20 | } | |
21 | }, | |
22 | { | |
23 | 'url': 'https://www.bundesliga.com/en/bundesliga/videos/latest-features/T8IKc8TX?vid=ROHjs06G', | |
24 | 'only_matching': True | |
25 | }, | |
26 | { | |
27 | 'url': 'https://www.bundesliga.com/en/bundesliga/videos/goals?vid=mOG56vWA', | |
28 | 'only_matching': True | |
29 | } | |
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) |