]> jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/cinemax.py
[cleanup] Add more ruff rules (#10149)
[yt-dlp.git] / yt_dlp / extractor / cinemax.py
1 from .hbo import HBOBaseIE
2
3
4 class CinemaxIE(HBOBaseIE):
5 _WORKING = False
6 _VALID_URL = r'https?://(?:www\.)?cinemax\.com/(?P<path>[^/]+/video/[0-9a-z-]+-(?P<id>\d+))'
7 _TESTS = [{
8 'url': 'https://www.cinemax.com/warrior/video/s1-ep-1-recap-20126903',
9 'md5': '82e0734bba8aa7ef526c9dd00cf35a05',
10 'info_dict': {
11 'id': '20126903',
12 'ext': 'mp4',
13 'title': 'S1 Ep 1: Recap',
14 },
15 'expected_warnings': ['Unknown MIME type application/mp4 in DASH manifest'],
16 }, {
17 'url': 'https://www.cinemax.com/warrior/video/s1-ep-1-recap-20126903.embed',
18 'only_matching': True,
19 }]
20
21 def _real_extract(self, url):
22 path, video_id = self._match_valid_url(url).groups()
23 info = self._extract_info(f'https://www.cinemax.com/{path}.xml', video_id)
24 info['id'] = video_id
25 return info