From: dirkf Date: Sat, 17 Jun 2023 14:34:11 +0000 (+0100) Subject: [jsinterp] Fix test for failed match in extract_object() X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=ff75c300f52321dc7322e28d1df153cf0ea65a6d;p=youtube-dl [jsinterp] Fix test for failed match in extract_object() --- diff --git a/youtube_dl/jsinterp.py b/youtube_dl/jsinterp.py index 9d4a5bc57..c18c4fef1 100644 --- a/youtube_dl/jsinterp.py +++ b/youtube_dl/jsinterp.py @@ -985,9 +985,9 @@ class JSInterpreter(object): \((?P[^)]*)\)\s* (?P{.+})''' % {'name': re.escape(funcname)}, self.code) - code, _ = self._separate_at_paren(func_m.group('code')) # refine the match if func_m is None: 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 def extract_function(self, funcname):