projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[pluralsight] Add support for alternative webpage layout (Closes #7607)
[youtube-dl]
/
youtube_dl
/
extractor
/
miomio.py
diff --git
a/youtube_dl/extractor/miomio.py
b/youtube_dl/extractor/miomio.py
index 3f812e00568c312fa9952d169f14ddd39bbde17e..ce391c759c22af0cb8949118b3915602197b9f47 100644
(file)
--- a/
youtube_dl/extractor/miomio.py
+++ b/
youtube_dl/extractor/miomio.py
@@
-52,6
+52,8
@@
class MioMioIE(InfoExtractor):
mioplayer_path = self._search_regex(
r'src="(/mioplayer/[^"]+)"', webpage, 'ref_path')
mioplayer_path = self._search_regex(
r'src="(/mioplayer/[^"]+)"', webpage, 'ref_path')
+ http_headers = {'Referer': 'http://www.miomio.tv%s' % mioplayer_path}
+
xml_config = self._search_regex(
r'flashvars="type=(?:sina|video)&(.+?)&',
webpage, 'xml config')
xml_config = self._search_regex(
r'flashvars="type=(?:sina|video)&(.+?)&',
webpage, 'xml config')
@@
-63,15
+65,11
@@
class MioMioIE(InfoExtractor):
vid_config_request = compat_urllib_request.Request(
'http://www.miomio.tv/mioplayer/mioplayerconfigfiles/sina.php?{0}'.format(xml_config),
vid_config_request = compat_urllib_request.Request(
'http://www.miomio.tv/mioplayer/mioplayerconfigfiles/sina.php?{0}'.format(xml_config),
- headers=
{'Referer': 'http://www.miomio.tv/mioplayer/mioplayer-v3.0.swf'}
)
+ headers=
http_headers
)
# the following xml contains the actual configuration information on the video file(s)
vid_config = self._download_xml(vid_config_request, video_id)
# 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,
- }
-
if not int_or_none(xpath_text(vid_config, 'timelength')):
raise ExtractorError('Unable to load videos!', expected=True)
if not int_or_none(xpath_text(vid_config, 'timelength')):
raise ExtractorError('Unable to load videos!', expected=True)