]> jfr.im git - yt-dlp.git/blame - yt_dlp/extractor/vimm.py
[glomex] Add new extractors (#1979)
[yt-dlp.git] / yt_dlp / extractor / vimm.py
CommitLineData
e8736539
AK
1# coding: utf-8
2from .common import InfoExtractor
3
4
5class VimmIE(InfoExtractor):
6 _VALID_URL = r'https?://(?:www\.)?vimm\.tv/c/(?P<id>[0-9a-z-]+)'
7 _TESTS = [{
8 'url': 'https://www.vimm.tv/c/calimeatwagon',
9 'info_dict': {
10 'id': 'calimeatwagon',
11 'ext': 'mp4',
12 'title': 're:^calimeatwagon [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}$',
13 'live_status': 'is_live',
14 },
15 'skip': 'Live',
16 }]
17
18 def _real_extract(self, url):
19 channel_id = self._match_id(url)
20
21 formats, subs = self._extract_m3u8_formats_and_subtitles(
22 f'https://www.vimm.tv/hls/{channel_id}.m3u8', channel_id, 'mp4', m3u8_id='hls', live=True)
23 self._sort_formats(formats)
24
25 return {
26 'id': channel_id,
27 'title': channel_id,
28 'is_live': True,
29 'formats': formats,
30 'subtitles': subs,
31 }