2 from __future__ import unicode_literals
4 from .common import InfoExtractor
5 from ..utils import int_or_none
8 class TeleQuebecIE(InfoExtractor):
9 _VALID_URL = r'https?://zonevideo\.telequebec\.tv/media/(?P<id>\d+)'
11 'url': 'http://zonevideo.telequebec.tv/media/20984/le-couronnement-de-new-york/couronnement-de-new-york',
12 'md5': 'fe95a0957e5707b1b01f5013e725c90f',
16 'title': 'Le couronnement de New York',
17 'description': 'md5:f5b3d27a689ec6c1486132b2d687d432',
18 'upload_date': '20160220',
19 'timestamp': 1455965438,
23 def _real_extract(self, url):
24 media_id = self._match_id(url)
25 media_data = self._download_json(
26 'https://mnmedias.api.telequebec.tv/api/v2/media/' + media_id,
29 '_type': 'url_transparent',
31 'url': 'limelight:media:' + media_data['streamInfo']['sourceId'],
32 'title': media_data['title'],
33 'description': media_data.get('descriptions', [{'text': None}])[0].get('text'),
34 'duration': int_or_none(media_data.get('durationInMilliseconds'), 1000),
35 'ie_key': 'LimelightMedia',