]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[mgtv] pass geo verification headers for api request
authorRemita Amine <remitamine@gmail.com>
Fri, 8 Jul 2016 19:15:21 +0000 (20:15 +0100)
committerRemita Amine <remitamine@gmail.com>
Fri, 8 Jul 2016 19:18:25 +0000 (20:18 +0100)
youtube_dl/extractor/mgtv.py

index 9fbc74f5d52e819ca3213623a30b6d9cd2e6ec08..d970e94ecd2425db06056ea615af02b92a39e292 100644 (file)
@@ -26,7 +26,8 @@ class MGTVIE(InfoExtractor):
         video_id = self._match_id(url)
         api_data = self._download_json(
             'http://v.api.mgtv.com/player/video', video_id,
-            query={'video_id': video_id})['data']
+            query={'video_id': video_id},
+            headers=self.geo_verification_headers())['data']
         info = api_data['info']
 
         formats = []