mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-28 05:01:49 +00:00
[jsinterp] Fix test for failed match in extract_object()
This commit is contained in:
parent
a2534f7b88
commit
ff75c300f5
1 changed files with 1 additions and 1 deletions
|
@ -985,9 +985,9 @@ class JSInterpreter(object):
|
||||||
\((?P<args>[^)]*)\)\s*
|
\((?P<args>[^)]*)\)\s*
|
||||||
(?P<code>{.+})''' % {'name': re.escape(funcname)},
|
(?P<code>{.+})''' % {'name': re.escape(funcname)},
|
||||||
self.code)
|
self.code)
|
||||||
code, _ = self._separate_at_paren(func_m.group('code')) # refine the match
|
|
||||||
if func_m is None:
|
if func_m is None:
|
||||||
raise self.Exception('Could not find JS function "{funcname}"'.format(**locals()))
|
raise self.Exception('Could not find JS function "{funcname}"'.format(**locals()))
|
||||||
|
code, _ = self._separate_at_paren(func_m.group('code')) # refine the match
|
||||||
return self.build_arglist(func_m.group('args')), code
|
return self.build_arglist(func_m.group('args')), code
|
||||||
|
|
||||||
def extract_function(self, funcname):
|
def extract_function(self, funcname):
|
||||||
|
|
Loading…
Reference in a new issue