[tnaflix] Fix relative URLs (empflix)
authorSergey M․ <dstftw@gmail.com>
Thu, 4 Jun 2015 14:42:37 +0000 (20:42 +0600)
committerSergey M․ <dstftw@gmail.com>
Thu, 4 Jun 2015 14:42:37 +0000 (20:42 +0600)
youtube_dl/extractor/tnaflix.py

index 3e335d653691fa6c5af61cc601f9e795bb69d7c6..c282865b2517d8cbd62df6f2dee0540146baae48 100644 (file)
@@ -61,14 +61,15 @@ class TNAFlixIE(InfoExtractor):
             cfg_url, display_id, note='Downloading metadata',
             transform_source=fix_xml_ampersands)
 
-        thumbnail = cfg_xml.find('./startThumb').text
+        thumbnail = self._proto_relative_url(
+            cfg_xml.find('./startThumb').text, 'http:')
 
         formats = []
         for item in cfg_xml.findall('./quality/item'):
             video_url = re.sub('speed=\d+', 'speed=', item.find('videoLink').text)
             format_id = item.find('res').text
             fmt = {
-                'url': video_url,
+                'url': self._proto_relative_url(video_url, 'http:'),
                 'format_id': format_id,
             }
             m = re.search(r'^(\d+)', format_id)