3
3
4
4
5
5
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-]+)$'
7
8
_TESTS = [{
8
9
'url' : 'https://www.vimm.tv/c/calimeatwagon' ,
9
10
'info_dict' : {
@@ -13,6 +14,9 @@ class VimmIE(InfoExtractor):
13
14
'live_status' : 'is_live' ,
14
15
},
15
16
'skip' : 'Live' ,
17
+ }, {
18
+ 'url' : 'https://www.vimm.tv/octaafradio' ,
19
+ 'only_matching' : True ,
16
20
}]
17
21
18
22
def _real_extract (self , url ):
@@ -29,3 +33,37 @@ def _real_extract(self, url):
29
33
'formats' : formats ,
30
34
'subtitles' : subs ,
31
35
}
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