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.

30 lines
1.0 KiB

  1. # coding: utf-8
  2. from __future__ import unicode_literals
  3. from .common import InfoExtractor
  4. class CTVIE(InfoExtractor):
  5. _VALID_URL = r'https?://(?:www\.)?ctv\.ca/video/player\?vid=(?P<id>[0-9.]+)'
  6. _TESTS = [{
  7. 'url': 'http://www.ctv.ca/video/player?vid=706966',
  8. 'md5': 'ff2ebbeae0aa2dcc32a830c3fd69b7b0',
  9. 'info_dict': {
  10. 'id': '706966',
  11. 'ext': 'mp4',
  12. 'title': 'Larry Day and Richard Jutras on the TIFF red carpet of \'Stonewall\'',
  13. 'description': 'etalk catches up with Larry Day and Richard Jutras on the TIFF red carpet of "Stonewall”.',
  14. 'upload_date': '20150919',
  15. 'timestamp': 1442624700,
  16. },
  17. 'expected_warnings': ['HTTP Error 404'],
  18. }]
  19. def _real_extract(self, url):
  20. video_id = self._match_id(url)
  21. return {
  22. '_type': 'url_transparent',
  23. 'id': video_id,
  24. 'url': '9c9media:ctv_web:%s' % video_id,
  25. 'ie_key': 'NineCNineMedia',
  26. }