about summary refs log tree commit diff
path: root/youtube_dl/extractor/miomio.py
diff options
context:
space:
mode:
authorremitamine <remitamine@gmail.com>2015-11-06 02:09:55 +0100
committerremitamine <remitamine@gmail.com>2015-11-06 02:09:55 +0100
commit6953d8e95a78e83f087693b7353baab96b09fbdd (patch)
tree2837332ab8dc641cdf11b1d12b14824833069e55 /youtube_dl/extractor/miomio.py
parentb3613d36da14ab527166326707c0f911d192144d (diff)
downloadyoutube-dl-6953d8e95a78e83f087693b7353baab96b09fbdd.tar.gz
youtube-dl-6953d8e95a78e83f087693b7353baab96b09fbdd.tar.xz
youtube-dl-6953d8e95a78e83f087693b7353baab96b09fbdd.zip
[miomio] fix info extraction (fixes #7366)
Diffstat (limited to 'youtube_dl/extractor/miomio.py')
-rw-r--r--youtube_dl/extractor/miomio.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/youtube_dl/extractor/miomio.py b/youtube_dl/extractor/miomio.py
index a784fc5fb..3f812e005 100644
--- a/youtube_dl/extractor/miomio.py
+++ b/youtube_dl/extractor/miomio.py
@@ -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,