From: Sergey M․ Date: Thu, 23 Jun 2016 02:41:34 +0000 (+0700) Subject: [jsinterp] Relax JS function regex (Closes #9863) X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=b46eabecd3d6e8ea6dd3dc5a948ecbb65d818205;p=youtube-dl [jsinterp] Relax JS function regex (Closes #9863) --- diff --git a/youtube_dl/jsinterp.py b/youtube_dl/jsinterp.py index a7440c582..9737f7002 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*=\s*function|var\s+%s\s*=\s*function)\s* \((?P[^)]*)\)\s* \{(?P[^}]+)\}''' % ( re.escape(funcname), re.escape(funcname), re.escape(funcname)),