aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-03-10 13:35:40 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-03-10 13:35:45 +0100
commitae7ed92057dcb7b9b582416d6dcf584843eca460 (patch)
treefc059bb4e5a2aa267dcbf7c1461bd971ebbce482 /youtube_dl
parente45b31d9bd824b01142d52b0de0d6823a49b2af6 (diff)
[youtube] Fix up invalid JSON
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/youtube.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index 166a0cf70..4c3dd8341 100644
--- 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:
- 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')
- 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