videodetective.py 865 B

123456789101112131415161718192021222324252627
  1. from .common import InfoExtractor
  2. from .internetvideoarchive import InternetVideoArchiveIE
  3. class VideoDetectiveIE(InfoExtractor):
  4. _VALID_URL = r'https?://(?:www\.)?videodetective\.com/[^/]+/[^/]+/(?P<id>\d+)'
  5. _TEST = {
  6. 'url': 'http://www.videodetective.com/movies/kick-ass-2/194487',
  7. 'info_dict': {
  8. 'id': '194487',
  9. 'ext': 'mp4',
  10. 'title': 'Kick-Ass 2',
  11. 'description': 'md5:c189d5b7280400630a1d3dd17eaa8d8a',
  12. },
  13. 'params': {
  14. # m3u8 download
  15. 'skip_download': True,
  16. },
  17. }
  18. def _real_extract(self, url):
  19. video_id = self._match_id(url)
  20. query = 'customerid=69249&publishedid=' + video_id
  21. return self.url_result(
  22. InternetVideoArchiveIE._build_json_url(query),
  23. ie=InternetVideoArchiveIE.ie_key())