mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 01:02:13 +01:00
Revert "[jsinterp] Avoid double key lookup for setting new key"
This reverts commit 7c05097633
.
This commit is contained in:
parent
819707920a
commit
1f749b6658
1 changed files with 5 additions and 3 deletions
|
@ -131,8 +131,9 @@ def interpret_expression(self, expr, local_vars, allow_recursion):
|
|||
if variable in local_vars:
|
||||
obj = local_vars[variable]
|
||||
else:
|
||||
obj = self._objects.setdefault(
|
||||
variable, self.extract_object(variable))
|
||||
if variable not in self._objects:
|
||||
self._objects[variable] = self.extract_object(variable)
|
||||
obj = self._objects[variable]
|
||||
|
||||
if arg_str is None:
|
||||
# Member access
|
||||
|
@ -203,7 +204,8 @@ def interpret_expression(self, expr, local_vars, allow_recursion):
|
|||
argvals = tuple([
|
||||
int(v) if v.isdigit() else local_vars[v]
|
||||
for v in m.group('args').split(',')])
|
||||
self._functions.setdefault(fname, self.extract_function(fname))
|
||||
if fname not in self._functions:
|
||||
self._functions[fname] = self.extract_function(fname)
|
||||
return self._functions[fname](argvals)
|
||||
|
||||
raise ExtractorError('Unsupported JS expression %r' % expr)
|
||||
|
|
Loading…
Reference in a new issue