[miomio] fix info extraction (fixes #7366)
authorremitamine <remitamine@gmail.com>
Fri, 6 Nov 2015 01:09:55 +0000 (02:09 +0100)
committerremitamine <remitamine@gmail.com>
Fri, 6 Nov 2015 01:09:55 +0000 (02:09 +0100)
youtube_dl/extractor/miomio.py

index a784fc5fba41c5931f6b1f040042e1900a6ff791..3f812e00568c312fa9952d169f14ddd39bbde17e 100644 (file)
@@ -4,6 +4,7 @@ from __future__ import unicode_literals
 import random
 
 from .common import InfoExtractor
+from ..compat import compat_urllib_request
 from ..utils import (
     xpath_text,
     int_or_none,
@@ -60,10 +61,12 @@ class MioMioIE(InfoExtractor):
             'http://www.miomio.tv/mioplayer/mioplayerconfigfiles/xml.php?id=%s&r=%s' % (id, random.randint(100, 999)),
             video_id)
 
-        # the following xml contains the actual configuration information on the video file(s)
-        vid_config = self._download_xml(
+        vid_config_request = compat_urllib_request.Request(
             'http://www.miomio.tv/mioplayer/mioplayerconfigfiles/sina.php?{0}'.format(xml_config),
-            video_id)
+            headers={'Referer': 'http://www.miomio.tv/mioplayer/mioplayer-v3.0.swf'})
+
+        # the following xml contains the actual configuration information on the video file(s)
+        vid_config = self._download_xml(vid_config_request, video_id)
 
         http_headers = {
             'Referer': 'http://www.miomio.tv%s' % mioplayer_path,