[telequebec] use geo bypass mechanism
authorRemita Amine <remitamine@gmail.com>
Tue, 21 Feb 2017 16:50:36 +0000 (17:50 +0100)
committerRemita Amine <remitamine@gmail.com>
Tue, 21 Feb 2017 16:52:50 +0000 (17:52 +0100)
youtube_dl/extractor/telequebec.py

index 4043fcb92457af1066735b3cb87e9550568efa4c..82d73c31d55c55dfb7cdf40f593265806f3fdb89 100644 (file)
@@ -2,7 +2,10 @@
 from __future__ import unicode_literals
 
 from .common import InfoExtractor
-from ..utils import int_or_none
+from ..utils import (
+    int_or_none,
+    smuggle_url,
+)
 
 
 class TeleQuebecIE(InfoExtractor):
@@ -28,7 +31,7 @@ class TeleQuebecIE(InfoExtractor):
         return {
             '_type': 'url_transparent',
             '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'],
             'description': media_data.get('descriptions', [{'text': None}])[0].get('text'),
             'duration': int_or_none(media_data.get('durationInMilliseconds'), 1000),