projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e45b31d
)
[youtube] Fix up invalid JSON
author
Philipp Hagemeister
<phihag@phihag.de>
Mon, 10 Mar 2014 12:35:40 +0000
(13:35 +0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Mon, 10 Mar 2014 12:35:45 +0000
(13:35 +0100)
youtube_dl/extractor/youtube.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/youtube.py
b/youtube_dl/extractor/youtube.py
index 166a0cf70caf5a52b5891763438cbc892b1a9533..4c3dd83419f5da493f3f83e6322ae9eaa464f926 100644
(file)
--- a/
youtube_dl/extractor/youtube.py
+++ b/
youtube_dl/extractor/youtube.py
@@
-1285,10
+1285,11
@@
class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
# Decide which formats to download
try:
# Decide which formats to download
try:
- mobj = re.search(r';ytplayer
.config =
({.*?});', video_webpage)
+ mobj = re.search(r';ytplayer
\.config\s*=\s*
({.*?});', video_webpage)
if not mobj:
raise ValueError('Could not find vevo ID')
if not mobj:
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']
# Easy way to know if the 's' value is in url_encoded_fmt_stream_map
# this signatures are encrypted
args = ytplayer_config['args']
# Easy way to know if the 's' value is in url_encoded_fmt_stream_map
# this signatures are encrypted