]> jfr.im git - yt-dlp.git/commitdiff
[Vimm] Add extractor (#2231)
authorAleri Kaisattera <redacted>
Wed, 5 Jan 2022 09:55:45 +0000 (15:55 +0600)
committerpukkandan <redacted>
Wed, 5 Jan 2022 09:55:23 +0000 (15:25 +0530)
Authored by: alerikaisattera

yt_dlp/extractor/extractors.py
yt_dlp/extractor/vimm.py [new file with mode: 0644]

index 268647e7f872656a516f4e726193cbb9015a1b64..078d231fd7161a9d734a2b2b48d1be9c0c83eb78 100644 (file)
     VimeoWatchLaterIE,
     VHXEmbedIE,
 )
+from .vimm import VimmIE
 from .vimple import VimpleIE
 from .vine import (
     VineIE,
diff --git a/yt_dlp/extractor/vimm.py b/yt_dlp/extractor/vimm.py
new file mode 100644 (file)
index 0000000..1424c6e
--- /dev/null
@@ -0,0 +1,31 @@
+# coding: utf-8
+from .common import InfoExtractor
+
+
+class VimmIE(InfoExtractor):
+    _VALID_URL = r'https?://(?:www\.)?vimm\.tv/c/(?P<id>[0-9a-z-]+)'
+    _TESTS = [{
+        'url': 'https://www.vimm.tv/c/calimeatwagon',
+        'info_dict': {
+            'id': 'calimeatwagon',
+            'ext': 'mp4',
+            'title': 're:^calimeatwagon [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}$',
+            'live_status': 'is_live',
+        },
+        'skip': 'Live',
+    }]
+
+    def _real_extract(self, url):
+        channel_id = self._match_id(url)
+
+        formats, subs = self._extract_m3u8_formats_and_subtitles(
+            f'https://www.vimm.tv/hls/{channel_id}.m3u8', channel_id, 'mp4', m3u8_id='hls', live=True)
+        self._sort_formats(formats)
+
+        return {
+            'id': channel_id,
+            'title': channel_id,
+            'is_live': True,
+            'formats': formats,
+            'subtitles': subs,
+        }