mirror of
https://github.com/l1ving/youtube-dl
synced 2024-12-21 17:53:11 +08:00
[jsinterp] Prevent mis-recognitions of local functions
This commit is contained in:
parent
c8bf86d50d
commit
fc040bfd05
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user