aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/jsinterp.py
diff options
context:
space:
mode:
Diffstat (limited to 'yt_dlp/jsinterp.py')
-rw-r--r--yt_dlp/jsinterp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/yt_dlp/jsinterp.py b/yt_dlp/jsinterp.py
index 9c280fb86..bda3fb459 100644
--- a/yt_dlp/jsinterp.py
+++ b/yt_dlp/jsinterp.py
@@ -812,9 +812,9 @@ class JSInterpreter:
\((?P<args>[^)]*)\)\s*
(?P<code>{.+})''' % {'name': re.escape(funcname)},
self.code)
- code, _ = self._separate_at_paren(func_m.group('code'))
if func_m is None:
raise self.Exception(f'Could not find JS function "{funcname}"')
+ code, _ = self._separate_at_paren(func_m.group('code'))
return [x.strip() for x in func_m.group('args').split(',')], code
def extract_function(self, funcname):