Browse Source

[jsinterp] Prevent mis-recognitions of local functions

Philipp Hagemeister 11 years ago
parent
commit
fc040bfd05
1 changed files with 1 additions and 1 deletions
  1. 1 1
      youtube_dl/jsinterp.py

+ 1 - 1
youtube_dl/jsinterp.py

@@ -99,7 +99,7 @@ class JSInterpreter(object):
 
     def extract_function(self, funcname):
         func_m = re.search(
-            (r'(?:function %s|%s\s*=\s*function)' % (
+            (r'(?:function %s|[{;]%s\s*=\s*function)' % (
                 re.escape(funcname), re.escape(funcname))) +
             r'\((?P<args>[a-z,]+)\){(?P<code>[^}]+)}',
             self.code)