[ie/dplay] Fix extractors (#10471)
[yt-dlp3.git] / yt_dlp / extractor / cinemax.py
blob66831ef62d232e87853e5a1ffffa559af527e6f8
1 from .hbo import HBOBaseIE
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',
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,
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