Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Backups
youtube-dl
Commits
0f6b87d0
Unverified
Commit
0f6b87d0
authored
Mar 08, 2017
by
Yen Chi Hsuan
Browse files
[miomio] Fix extraction
Closes #12291 Closes #12388 Closes #12402
parent
d7344d33
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
ChangeLog
ChangeLog
+6
-0
youtube_dl/extractor/miomio.py
youtube_dl/extractor/miomio.py
+12
-2
No files found.
ChangeLog
View file @
0f6b87d0
version <unreleased>
Extractors
* [miomio] Fix extraction (#12291, #12388, #12402)
version 2017.03.07
Core
...
...
youtube_dl/extractor/miomio.py
View file @
0f6b87d0
...
...
@@ -51,6 +51,7 @@ class MioMioIE(InfoExtractor):
'ext'
:
'mp4'
,
'title'
:
'マツコの知らない世界【劇的進化SP!ビニール傘&冷凍食品2016】 1_2 - 16 05 31'
,
},
'skip'
:
'Unable to load videos'
,
}]
def
_extract_mioplayer
(
self
,
webpage
,
video_id
,
title
,
http_headers
):
...
...
@@ -94,9 +95,18 @@ class MioMioIE(InfoExtractor):
return
entries
def
_download_chinese_webpage
(
self
,
*
args
,
**
kwargs
):
# Requests with English locales return garbage
headers
=
{
'Accept-Language'
:
'zh-TW,en-US;q=0.7,en;q=0.3'
,
}
kwargs
.
setdefault
(
'headers'
,
{}).
update
(
headers
)
return
self
.
_download_webpage
(
*
args
,
**
kwargs
)
def
_real_extract
(
self
,
url
):
video_id
=
self
.
_match_id
(
url
)
webpage
=
self
.
_download_webpage
(
url
,
video_id
)
webpage
=
self
.
_download_chinese_webpage
(
url
,
video_id
)
title
=
self
.
_html_search_meta
(
'description'
,
webpage
,
'title'
,
fatal
=
True
)
...
...
@@ -106,7 +116,7 @@ class MioMioIE(InfoExtractor):
if
'_h5'
in
mioplayer_path
:
player_url
=
compat_urlparse
.
urljoin
(
url
,
mioplayer_path
)
player_webpage
=
self
.
_download_webpage
(
player_webpage
=
self
.
_download_
chinese_
webpage
(
player_url
,
video_id
,
note
=
'Downloading player webpage'
,
headers
=
{
'Referer'
:
url
})
entries
=
self
.
_parse_html5_media_entries
(
player_url
,
player_webpage
,
video_id
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment