cinemax.py 896 B

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