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