aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleri Kaisattera <73682764+alerikaisattera@users.noreply.github.com>2022-01-24 23:07:04 +0600
committerGitHub <noreply@github.com>2022-01-24 22:37:04 +0530
commit8f028b5f4076875d8c857b7b79e245701c21b159 (patch)
treec7073b5a653e97e259110325a1014da59a9f3b27
parent013322a95e396ab21c8febc3e560d8a177c87f4a (diff)
downloadhypervideo-pre-8f028b5f4076875d8c857b7b79e245701c21b159.tar.lz
hypervideo-pre-8f028b5f4076875d8c857b7b79e245701c21b159.tar.xz
hypervideo-pre-8f028b5f4076875d8c857b7b79e245701c21b159.zip
[Vimm] add recording extractor (#2441)
Authored by: alerikaisattera
-rw-r--r--yt_dlp/extractor/extractors.py5
-rw-r--r--yt_dlp/extractor/vimm.py40
2 files changed, 43 insertions, 2 deletions
diff --git a/yt_dlp/extractor/extractors.py b/yt_dlp/extractor/extractors.py
index 09b56ce48..ca6b8c667 100644
--- a/yt_dlp/extractor/extractors.py
+++ b/yt_dlp/extractor/extractors.py
@@ -1835,7 +1835,10 @@ from .vimeo import (
VimeoWatchLaterIE,
VHXEmbedIE,
)
-from .vimm import VimmIE
+from .vimm import (
+ VimmIE,
+ VimmRecordingIE,
+)
from .vimple import VimpleIE
from .vine import (
VineIE,
diff --git a/yt_dlp/extractor/vimm.py b/yt_dlp/extractor/vimm.py
index 1424c6ee3..060b92ba6 100644
--- a/yt_dlp/extractor/vimm.py
+++ b/yt_dlp/extractor/vimm.py
@@ -3,7 +3,8 @@ from .common import InfoExtractor
class VimmIE(InfoExtractor):
- _VALID_URL = r'https?://(?:www\.)?vimm\.tv/c/(?P<id>[0-9a-z-]+)'
+ IE_NAME = 'Vimm:stream'
+ _VALID_URL = r'https?://(?:www\.)?vimm\.tv/(?:c/)?(?P<id>[0-9a-z-]+)$'
_TESTS = [{
'url': 'https://www.vimm.tv/c/calimeatwagon',
'info_dict': {
@@ -13,6 +14,9 @@ class VimmIE(InfoExtractor):
'live_status': 'is_live',
},
'skip': 'Live',
+ }, {
+ 'url': 'https://www.vimm.tv/octaafradio',
+ 'only_matching': True,
}]
def _real_extract(self, url):
@@ -29,3 +33,37 @@ class VimmIE(InfoExtractor):
'formats': formats,
'subtitles': subs,
}
+
+
+class VimmRecordingIE(InfoExtractor):
+ IE_NAME = 'Vimm:recording'
+ _VALID_URL = r'https?://(?:www\.)?vimm\.tv/c/(?P<channel_id>[0-9a-z-]+)\?v=(?P<video_id>[0-9A-Za-z]+)'
+ _TESTS = [{
+ 'url': 'https://www.vimm.tv/c/kaldewei?v=2JZsrPTFxsSz',
+ 'md5': '15122ee95baa32a548e4a3e120b598f1',
+ 'info_dict': {
+ 'id': '2JZsrPTFxsSz',
+ 'ext': 'mp4',
+ 'title': 'VIMM - [DE/GER] Kaldewei Live - In Farbe und Bunt',
+ 'uploader_id': 'kaldewei',
+ },
+ }]
+
+ def _real_extract(self, url):
+ channel_id, video_id = self._match_valid_url(url).groups()
+
+ webpage = self._download_webpage(url, video_id)
+ title = self._og_search_title(webpage)
+
+ formats, subs = self._extract_m3u8_formats_and_subtitles(
+ f'https://d211qfrkztakg3.cloudfront.net/{channel_id}/{video_id}/index.m3u8', video_id, 'mp4', m3u8_id='hls', live=False)
+ self._sort_formats(formats)
+
+ return {
+ 'id': video_id,
+ 'title': title,
+ 'is_live': False,
+ 'uploader_id': channel_id,
+ 'formats': formats,
+ 'subtitles': subs,
+ }