From 2415e66f889f38503b73e8ebc5f43ca342390e5c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 18:49:24 +0200 Subject: Adding upstream version 2024.03.10. Signed-off-by: Daniel Baumann --- yt_dlp/extractor/cinemax.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 yt_dlp/extractor/cinemax.py (limited to 'yt_dlp/extractor/cinemax.py') diff --git a/yt_dlp/extractor/cinemax.py b/yt_dlp/extractor/cinemax.py new file mode 100644 index 0000000..706ec85 --- /dev/null +++ b/yt_dlp/extractor/cinemax.py @@ -0,0 +1,25 @@ +from .hbo import HBOBaseIE + + +class CinemaxIE(HBOBaseIE): + _WORKING = False + _VALID_URL = r'https?://(?:www\.)?cinemax\.com/(?P[^/]+/video/[0-9a-z-]+-(?P\d+))' + _TESTS = [{ + 'url': 'https://www.cinemax.com/warrior/video/s1-ep-1-recap-20126903', + 'md5': '82e0734bba8aa7ef526c9dd00cf35a05', + 'info_dict': { + 'id': '20126903', + 'ext': 'mp4', + 'title': 'S1 Ep 1: Recap', + }, + 'expected_warnings': ['Unknown MIME type application/mp4 in DASH manifest'], + }, { + 'url': 'https://www.cinemax.com/warrior/video/s1-ep-1-recap-20126903.embed', + 'only_matching': True, + }] + + def _real_extract(self, url): + path, video_id = self._match_valid_url(url).groups() + info = self._extract_info('https://www.cinemax.com/%s.xml' % path, video_id) + info['id'] = video_id + return info -- cgit v1.2.3