From: Sergey M․ Date: Tue, 10 Jan 2017 14:25:29 +0000 (+0700) Subject: [youtube] Fix extraction (closes #11663, #11664) X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=d1aeacd9bfe12bdf064d8888f77ccf8bd30f1723;p=youtube-dl.git [youtube] Fix extraction (closes #11663, #11664) --- diff --git a/youtube_dl/jsinterp.py b/youtube_dl/jsinterp.py index a8df4aef0..24cdec28c 100644 --- a/youtube_dl/jsinterp.py +++ b/youtube_dl/jsinterp.py @@ -213,7 +213,7 @@ class JSInterpreter(object): def extract_object(self, objname): obj = {} obj_m = re.search( - (r'(?:var\s+)?%s\s*=\s*\{' % re.escape(objname)) + + (r'(?([a-zA-Z$0-9]+\s*:\s*function\(.*?\)\s*\{.*?\}(?:,\s*)?)*)' + r'\}\s*;', self.code)