1 from .common
import InfoExtractor
9 class ElevenSportsIE(InfoExtractor
):
10 _VALID_URL
= r
'https?://(?:www\.)?elevensports\.com/view/event/(?P<id>\w+)'
12 'url': 'https://elevensports.com/view/event/clf46yr3kenn80jgrqsjmwefk',
13 'md5': 'c0958d9ff90e4503a75544358758921d',
15 'id': 'clf46yr3kenn80jgrqsjmwefk',
16 'title': 'Cleveland SC vs Lionsbridge FC',
18 'description': 'md5:03b5238d6549f4ea1fddadf69b5e0b58',
19 'upload_date': '20230323',
20 'timestamp': 1679612400,
21 'thumbnail': r
're:^https?://.*\.(?:jpg|png)',
23 'params': {'skip_download': 'm3u8'}
25 'url': 'https://elevensports.com/view/event/clhpyd53b06160jez74qhgkmf',
26 'md5': 'c0958d9ff90e4503a75544358758921d',
28 'id': 'clhpyd53b06160jez74qhgkmf',
29 'title': 'AJNLF vs ARRAF',
31 'description': 'md5:c8c5e75c78f37c6d15cd6c475e43a8c1',
32 'upload_date': '20230521',
33 'timestamp': 1684684800,
34 'thumbnail': r
're:^https?://.*\.(?:jpg|png)',
36 'params': {'skip_download': 'm3u8'}
39 def _real_extract(self
, url
):
40 video_id
= self
._match
_id
(url
)
41 webpage
= self
._download
_webpage
(url
, video_id
)
42 event_id
= self
._search
_nextjs
_data
(webpage
, video_id
)['props']['pageProps']['event']['mclsEventId']
43 event_data
= self
._download
_json
(
44 f
'https://mcls-api.mycujoo.tv/bff/events/v1beta1/{event_id}', video_id
,
45 headers
={'Authorization': 'Bearer FBVKACGN37JQC5SFA0OVK8KKSIOP153G'}
)
46 formats
, subtitles
= self
._extract
_m
3u8_formats
_and
_subtitles
(
47 event_data
['streams'][0]['full_url'], video_id
, 'mp4', m3u8_id
='hls')
52 'subtitles': subtitles
,
53 **traverse_obj(event_data
, {
54 'title': ('title', {str}
),
55 'description': ('description', {str}
),
56 'timestamp': ('start_time', {parse_iso8601}
),
57 'thumbnail': ('thumbnail_url', {url_or_none}
),