You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
906 B

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