From: Sergey M․ Date: Fri, 18 Dec 2015 12:57:49 +0000 (+0600) Subject: [jsinterp] Extend function regex (Closes #7900, closes #7901) X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=b95779be21929c1aed1c0edbc3f9a5d11826973f;p=youtube-dl [jsinterp] Extend function regex (Closes #7900, closes #7901) --- diff --git a/youtube_dl/jsinterp.py b/youtube_dl/jsinterp.py index 2191e8b89..a7440c582 100644 --- a/youtube_dl/jsinterp.py +++ b/youtube_dl/jsinterp.py @@ -232,7 +232,7 @@ class JSInterpreter(object): def extract_function(self, funcname): func_m = re.search( r'''(?x) - (?:function\s+%s|[{;]%s\s*=\s*function|var\s+%s\s*=\s*function)\s* + (?:function\s+%s|[{;,]%s\s*=\s*function|var\s+%s\s*=\s*function)\s* \((?P[^)]*)\)\s* \{(?P[^}]+)\}''' % ( re.escape(funcname), re.escape(funcname), re.escape(funcname)),