Skip to content

Commit 8f028b5

Browse files
[Vimm] add recording extractor (yt-dlp#2441)
Authored by: alerikaisattera
1 parent 013322a commit 8f028b5

File tree

2 files changed

+43
-2
lines changed

2 files changed

+43
-2
lines changed

yt_dlp/extractor/extractors.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1835,7 +1835,10 @@
18351835
VimeoWatchLaterIE,
18361836
VHXEmbedIE,
18371837
)
1838-
from .vimm import VimmIE
1838+
from .vimm import (
1839+
VimmIE,
1840+
VimmRecordingIE,
1841+
)
18391842
from .vimple import VimpleIE
18401843
from .vine import (
18411844
VineIE,

yt_dlp/extractor/vimm.py

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44

55
class VimmIE(InfoExtractor):
6-
_VALID_URL = r'https?://(?:www\.)?vimm\.tv/c/(?P<id>[0-9a-z-]+)'
6+
IE_NAME = 'Vimm:stream'
7+
_VALID_URL = r'https?://(?:www\.)?vimm\.tv/(?:c/)?(?P<id>[0-9a-z-]+)$'
78
_TESTS = [{
89
'url': 'https://www.vimm.tv/c/calimeatwagon',
910
'info_dict': {
@@ -13,6 +14,9 @@ class VimmIE(InfoExtractor):
1314
'live_status': 'is_live',
1415
},
1516
'skip': 'Live',
17+
}, {
18+
'url': 'https://www.vimm.tv/octaafradio',
19+
'only_matching': True,
1620
}]
1721

1822
def _real_extract(self, url):
@@ -29,3 +33,37 @@ def _real_extract(self, url):
2933
'formats': formats,
3034
'subtitles': subs,
3135
}
36+
37+
38+
class VimmRecordingIE(InfoExtractor):
39+
IE_NAME = 'Vimm:recording'
40+
_VALID_URL = r'https?://(?:www\.)?vimm\.tv/c/(?P<channel_id>[0-9a-z-]+)\?v=(?P<video_id>[0-9A-Za-z]+)'
41+
_TESTS = [{
42+
'url': 'https://www.vimm.tv/c/kaldewei?v=2JZsrPTFxsSz',
43+
'md5': '15122ee95baa32a548e4a3e120b598f1',
44+
'info_dict': {
45+
'id': '2JZsrPTFxsSz',
46+
'ext': 'mp4',
47+
'title': 'VIMM - [DE/GER] Kaldewei Live - In Farbe und Bunt',
48+
'uploader_id': 'kaldewei',
49+
},
50+
}]
51+
52+
def _real_extract(self, url):
53+
channel_id, video_id = self._match_valid_url(url).groups()
54+
55+
webpage = self._download_webpage(url, video_id)
56+
title = self._og_search_title(webpage)
57+
58+
formats, subs = self._extract_m3u8_formats_and_subtitles(
59+
f'https://d211qfrkztakg3.cloudfront.net/{channel_id}/{video_id}/index.m3u8', video_id, 'mp4', m3u8_id='hls', live=False)
60+
self._sort_formats(formats)
61+
62+
return {
63+
'id': video_id,
64+
'title': title,
65+
'is_live': False,
66+
'uploader_id': channel_id,
67+
'formats': formats,
68+
'subtitles': subs,
69+
}

0 commit comments

Comments
 (0)