]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/telequebec.py
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
11 class TeleQuebecIE(InfoExtractor
):
12 _VALID_URL
= r
'https?://zonevideo\.telequebec\.tv/media/(?P<id>\d+)'
14 'url': 'http://zonevideo.telequebec.tv/media/20984/le-couronnement-de-new-york/couronnement-de-new-york',
15 'md5': 'fe95a0957e5707b1b01f5013e725c90f',
19 'title': 'Le couronnement de New York',
20 'description': 'md5:f5b3d27a689ec6c1486132b2d687d432',
21 'upload_date': '20160220',
22 'timestamp': 1455965438,
26 def _real_extract(self
, url
):
27 media_id
= self
._match
_id
(url
)
28 media_data
= self
._download
_json
(
29 'https://mnmedias.api.telequebec.tv/api/v2/media/' + media_id
,
32 '_type': 'url_transparent',
34 'url': smuggle_url('limelight:media:' + media_data
['streamInfo']['sourceId'], {'geo_countries': ['CA']}),
35 'title': media_data
['title'],
36 'description': media_data
.get('descriptions', [{'text': None}])[0].get('text'),
37 'duration': int_or_none(media_data
.get('durationInMilliseconds'), 1000),
38 'ie_key': 'LimelightMedia',