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