]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[adobepass] use geo verification headers for all requests
authorRemita Amine <remitamine@gmail.com>
Fri, 28 Apr 2017 08:47:30 +0000 (09:47 +0100)
committerRemita Amine <remitamine@gmail.com>
Fri, 28 Apr 2017 08:48:52 +0000 (09:48 +0100)
youtube_dl/extractor/adobepass.py

index 100cf997f19ff9e6c482ec23c6ad889a354405c4..7da96c65c694fbd57fa47b8de30f77851e5b5f13 100644 (file)
@@ -1308,6 +1308,12 @@ class AdobePassIE(InfoExtractor):
     _USER_AGENT = 'Mozilla/5.0 (X11; Linux i686; rv:47.0) Gecko/20100101 Firefox/47.0'
     _MVPD_CACHE = 'ap-mvpd'
 
+    def _download_webpage_handle(self, *args, **kwargs):
+        headers = kwargs.get('headers', {})
+        headers.update(self.geo_verification_headers())
+        kwargs['headers'] = headers
+        return super(AdobePassIE, self)._download_webpage_handle(*args, **kwargs)
+
     @staticmethod
     def _get_mvpd_resource(provider_id, title, guid, rating):
         channel = etree.Element('channel')