[youtube] Fix extraction.
[youtube-dl] / youtube_dl / extractor / nuevo.py
index 225da033ccff1e12e993394925510c44c49b19cb..be1e09d3752376c5f64c7563090dbee730d25317 100644 (file)
@@ -1,4 +1,4 @@
-# encoding: utf-8
+# coding: utf-8
 from __future__ import unicode_literals
 
 from .common import InfoExtractor
@@ -10,13 +10,14 @@ 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)
-        thumbnail = xpath_text(config, './image')
+        thumbnail = xpath_text(config, ['./image', './thumb'])
         duration = float_or_none(xpath_text(config, './duration'))
 
         formats = []