[nuevo] Pass headers to _extract_nuevo
authorSergey M․ <dstftw@gmail.com>
Mon, 8 May 2017 13:03:38 +0000 (20:03 +0700)
committerSergey M․ <dstftw@gmail.com>
Mon, 8 May 2017 13:03:38 +0000 (20:03 +0700)
youtube_dl/extractor/nuevo.py

index 87fb94d1f583f5b174fe8d9ace84e4791f3afa4e..be1e09d3752376c5f64c7563090dbee730d25317 100644 (file)
@@ -10,9 +10,10 @@ from ..utils import (
 
 
 class NuevoBaseIE(InfoExtractor):
-    def _extract_nuevo(self, config_url, video_id):
+    def _extract_nuevo(self, config_url, video_id, headers={}):
         config = self._download_xml(
-            config_url, video_id, transform_source=lambda s: s.strip())
+            config_url, video_id, transform_source=lambda s: s.strip(),
+            headers=headers)
 
         title = xpath_text(config, './title', 'title', fatal=True).strip()
         video_id = xpath_text(config, './mediaid', default=video_id)