]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[jsinterp] Extend function regex (Closes #7900, closes #7901)
authorSergey M․ <dstftw@gmail.com>
Fri, 18 Dec 2015 12:57:49 +0000 (18:57 +0600)
committerSergey M․ <dstftw@gmail.com>
Fri, 18 Dec 2015 12:57:49 +0000 (18:57 +0600)
youtube_dl/jsinterp.py

index 2191e8b8956563830245b574702dc68e6a3b8dbd..a7440c58242079ea1c6874e1bed0abe756fdc814 100644 (file)
@@ -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<args>[^)]*)\)\s*
                 \{(?P<code>[^}]+)\}''' % (
                 re.escape(funcname), re.escape(funcname), re.escape(funcname)),