A feature-rich command-line audio/video downloader
[jsinterp] Prevent mis-recognitions of local functions
Philipp Hagemeisterfc040bfd0582
diff --git a/youtube_dl/jsinterp.py b/youtube_dl/jsinterp.pyindex d7e76713f3..3bbb077041 100644--- a/youtube_dl/jsinterp.py+++ b/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)