From 290a5a8d85e8f7514099fa305c8f0b26d1b35a78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergey=20M=E2=80=A4?= Date: Mon, 27 Apr 2015 22:17:51 +0600 Subject: [PATCH] [escapist] Fix imsVideo regex (#5090) --- youtube_dl/extractor/escapist.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/escapist.py b/youtube_dl/extractor/escapist.py index a01a05b06..600ebf078 100644 --- a/youtube_dl/extractor/escapist.py +++ b/youtube_dl/extractor/escapist.py @@ -65,7 +65,10 @@ class EscapistIE(InfoExtractor): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) - imsVideo = json.loads(self._search_regex(r'imsVideo\.play\(([^\)]+)\);', webpage, 'imsVideo')) + imsVideo = self._parse_json( + self._search_regex( + r'imsVideo\.play\(({.+?})\);', webpage, 'imsVideo'), + video_id) video_id = imsVideo['videoID'] key = imsVideo['hash']