atconnect: use new atjsparse syntax

This commit is contained in:
DarkCat09 2022-12-25 17:51:29 +04:00
parent 3fa1db2edb
commit c02d3fed3e

View file

@ -121,8 +121,9 @@ class AternosConnect:
if len(js_code) > 1:
token_func = js_code[1]
ctx = atjsparse.exec_js(token_func)
self.token = ctx.window['AJAX_TOKEN']
js = atjsparse.get_interpreter()
js.exec_js(token_func)
self.token = js['AJAX_TOKEN']
except (IndexError, TypeError) as err: