diff options
author | Jesús <heckyel@hyperbola.info> | 2022-02-05 10:48:13 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2022-02-05 10:48:13 -0500 |
commit | c4b763b19f54ed5dfc2fd408adb9ed74126f6740 (patch) | |
tree | 1bbf4450644370608f97bf6d4d7db818c5039f55 /yt_dlp/extractor/mixch.py | |
parent | 5aac4e0267e32d98eb68692afedafda3b41ea629 (diff) | |
parent | a3125791c7a5cdf2c8c025b99788bf686edd1a8a (diff) | |
download | hypervideo-pre-c4b763b19f54ed5dfc2fd408adb9ed74126f6740.tar.lz hypervideo-pre-c4b763b19f54ed5dfc2fd408adb9ed74126f6740.tar.xz hypervideo-pre-c4b763b19f54ed5dfc2fd408adb9ed74126f6740.zip |
updated from upstream | 05/02/2022 at 10:48
Diffstat (limited to 'yt_dlp/extractor/mixch.py')
-rw-r--r-- | yt_dlp/extractor/mixch.py | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/yt_dlp/extractor/mixch.py b/yt_dlp/extractor/mixch.py index a99ddd172..31f450dfa 100644 --- a/yt_dlp/extractor/mixch.py +++ b/yt_dlp/extractor/mixch.py @@ -11,7 +11,7 @@ class MixchIE(InfoExtractor): IE_NAME = 'mixch' _VALID_URL = r'https?://(?:www\.)?mixch\.tv/u/(?P<id>\d+)' - TESTS = [{ + _TESTS = [{ 'url': 'https://mixch.tv/u/16236849/live', 'skip': 'don\'t know if this live persists', 'info_dict': { @@ -53,3 +53,33 @@ class MixchIE(InfoExtractor): }], 'is_live': True, } + + +class MixchArchiveIE(InfoExtractor): + IE_NAME = 'mixch:archive' + _VALID_URL = r'https?://(?:www\.)?mixch\.tv/archive/(?P<id>\d+)' + + _TESTS = [{ + 'url': 'https://mixch.tv/archive/421', + 'skip': 'paid video, no DRM. expires at Jan 23', + 'info_dict': { + 'id': '421', + 'title': '96NEKO SHOW TIME', + } + }] + + def _real_extract(self, url): + video_id = self._match_id(url) + webpage = self._download_webpage(url, video_id) + + html5_videos = self._parse_html5_media_entries( + url, webpage.replace('video-js', 'video'), video_id, 'hls') + if not html5_videos: + self.raise_login_required(method='cookies') + infodict = html5_videos[0] + infodict.update({ + 'id': video_id, + 'title': self._html_search_regex(r'class="archive-title">(.+?)</', webpage, 'title') + }) + + return infodict |