mirror of
https://gitlab.com/dstftw/youtube-dl.git
synced 2020-11-16 09:42:26 +00:00
[youtube] Fix up invalid JSON
This commit is contained in:
parent
e45b31d9bd
commit
ae7ed92057
|
@ -1285,10 +1285,11 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
|
||||||
|
|
||||||
# Decide which formats to download
|
# Decide which formats to download
|
||||||
try:
|
try:
|
||||||
mobj = re.search(r';ytplayer.config = ({.*?});', video_webpage)
|
mobj = re.search(r';ytplayer\.config\s*=\s*({.*?});', video_webpage)
|
||||||
if not mobj:
|
if not mobj:
|
||||||
raise ValueError('Could not find vevo ID')
|
raise ValueError('Could not find vevo ID')
|
||||||
ytplayer_config = json.loads(mobj.group(1))
|
json_code = uppercase_escape(mobj.group(1))
|
||||||
|
ytplayer_config = json.loads(json_code)
|
||||||
args = ytplayer_config['args']
|
args = ytplayer_config['args']
|
||||||
# Easy way to know if the 's' value is in url_encoded_fmt_stream_map
|
# Easy way to know if the 's' value is in url_encoded_fmt_stream_map
|
||||||
# this signatures are encrypted
|
# this signatures are encrypted
|
||||||
|
|
Loading…
Reference in a new issue