2 from __future__ import unicode_literals
6 from .common import InfoExtractor
9 class CTVIE(InfoExtractor):
10 _VALID_URL = r'https?://(?:www\.)?(?P<domain>ctv|tsn|bnn|thecomedynetwork)\.ca/.*?(?:\bvid=|-vid|~|%7E)(?P<id>[0-9.]+)'
12 'url': 'http://www.ctv.ca/video/player?vid=706966',
13 'md5': 'ff2ebbeae0aa2dcc32a830c3fd69b7b0',
17 'title': 'Larry Day and Richard Jutras on the TIFF red carpet of \'Stonewall\'',
18 'description': 'etalk catches up with Larry Day and Richard Jutras on the TIFF red carpet of "Stonewall”.',
19 'upload_date': '20150919',
20 'timestamp': 1442624700,
22 'expected_warnings': ['HTTP Error 404'],
24 'url': 'http://www.thecomedynetwork.ca/video/player?vid=923582',
25 'only_matching': True,
27 'url': 'http://www.tsn.ca/video/expectations-high-for-milos-raonic-at-us-open~939549',
28 'only_matching': True,
30 'url': 'http://www.bnn.ca/video/berman-s-call-part-two-viewer-questions~939654',
31 'only_matching': True,
33 'url': 'http://www.ctv.ca/YourMorning/Video/S1E6-Monday-August-29-2016-vid938009',
34 'only_matching': True,
37 def _real_extract(self, url):
38 domain, video_id = re.match(self._VALID_URL, url).groups()
39 if domain == 'thecomedynetwork':
42 '_type': 'url_transparent',
44 'url': '9c9media:%s_web:%s' % (domain, video_id),
45 'ie_key': 'NineCNineMedia',