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
a49eccdf
Unverified
Commit
a49eccdf
authored
May 28, 2017
by
Yen Chi Hsuan
Browse files
[youtube] Parse player_url if format URLs are encrypted or DASH MPDs are requested
Fixes #13211
parent
a846173d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
ChangeLog
ChangeLog
+2
-0
youtube_dl/extractor/youtube.py
youtube_dl/extractor/youtube.py
+6
-5
No files found.
ChangeLog
View file @
a49eccdf
version <unreleased>
version <unreleased>
Extractors
Extractors
* [youtube] Fix DASH MPD extraction for videos with non-encrypted format URLs
(#13211)
+ [youku] Extract more metadata (#10433)
+ [youku] Extract more metadata (#10433)
...
...
youtube_dl/extractor/youtube.py
View file @
a49eccdf
...
@@ -1715,12 +1715,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
...
@@ -1715,12 +1715,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
format_id
=
url_data
[
'itag'
][
0
]
format_id
=
url_data
[
'itag'
][
0
]
url
=
url_data
[
'url'
][
0
]
url
=
url_data
[
'url'
][
0
]
if
'sig'
in
url_data
:
if
's'
in
url_data
or
self
.
_downloader
.
params
.
get
(
'youtube_include_dash_manifest'
,
True
):
url
+=
'&signature='
+
url_data
[
'sig'
][
0
]
elif
's'
in
url_data
:
encrypted_sig
=
url_data
[
's'
][
0
]
ASSETS_RE
=
r
'"assets":.+?"js":\s*("[^"]+")'
ASSETS_RE
=
r
'"assets":.+?"js":\s*("[^"]+")'
jsplayer_url_json
=
self
.
_search_regex
(
jsplayer_url_json
=
self
.
_search_regex
(
ASSETS_RE
,
ASSETS_RE
,
embed_webpage
if
age_gate
else
video_webpage
,
embed_webpage
if
age_gate
else
video_webpage
,
...
@@ -1741,6 +1737,11 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
...
@@ -1741,6 +1737,11 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
video_webpage
,
'age gate player URL'
)
video_webpage
,
'age gate player URL'
)
player_url
=
json
.
loads
(
player_url_json
)
player_url
=
json
.
loads
(
player_url_json
)
if
'sig'
in
url_data
:
url
+=
'&signature='
+
url_data
[
'sig'
][
0
]
elif
's'
in
url_data
:
encrypted_sig
=
url_data
[
's'
][
0
]
if
self
.
_downloader
.
params
.
get
(
'verbose'
):
if
self
.
_downloader
.
params
.
get
(
'verbose'
):
if
player_url
is
None
:
if
player_url
is
None
:
player_version
=
'unknown'
player_version
=
'unknown'
...
...
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