From: Sergey M․ Date: Wed, 2 May 2018 13:43:34 +0000 (+0700) Subject: [watchbox] Fix extraction (closes #16356) X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=a90a6b54ee5ceb6002f4ebd73d62c65cc00484d9;p=youtube-dl [watchbox] Fix extraction (closes #16356) --- diff --git a/youtube_dl/extractor/watchbox.py b/youtube_dl/extractor/watchbox.py index b382338fa..be0bcba15 100644 --- a/youtube_dl/extractor/watchbox.py +++ b/youtube_dl/extractor/watchbox.py @@ -69,7 +69,7 @@ class WatchBoxIE(InfoExtractor): source = self._parse_json( self._search_regex( - r'(?s)source\s*:\s*({.+?})\s*,\s*\n', webpage, 'source', + r'(?s)source["\']?\s*:\s*({.+?})\s*[,}]', webpage, 'source', default='{}'), video_id, transform_source=js_to_json, fatal=False) or {}