0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-17 01:25:11 +00:00

[telequebec] use geo bypass mechanism

This commit is contained in:
Remita Amine 2017-02-21 17:50:36 +01:00
parent 3444844b04
commit 33dc173cdc

View file

@ -2,7 +2,10 @@
from __future__ import unicode_literals from __future__ import unicode_literals
from .common import InfoExtractor from .common import InfoExtractor
from ..utils import int_or_none from ..utils import (
int_or_none,
smuggle_url,
)
class TeleQuebecIE(InfoExtractor): class TeleQuebecIE(InfoExtractor):
@ -28,7 +31,7 @@ def _real_extract(self, url):
return { return {
'_type': 'url_transparent', '_type': 'url_transparent',
'id': media_id, 'id': media_id,
'url': 'limelight:media:' + media_data['streamInfo']['sourceId'], 'url': smuggle_url('limelight:media:' + media_data['streamInfo']['sourceId'], {'geo_countries': ['CA']}),
'title': media_data['title'], 'title': media_data['title'],
'description': media_data.get('descriptions', [{'text': None}])[0].get('text'), 'description': media_data.get('descriptions', [{'text': None}])[0].get('text'),
'duration': int_or_none(media_data.get('durationInMilliseconds'), 1000), 'duration': int_or_none(media_data.get('durationInMilliseconds'), 1000),