We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7578d3e commit 2238c44Copy full SHA for 2238c44
1 file changed
ThermiaOnlineAPI/api/ThermiaAPI.py
@@ -581,14 +581,10 @@ def __authenticate(self) -> bool:
581
csrf_token = ""
582
583
if request_auth.status_code == 200:
584
- settings_string = [
585
- i
586
- for i in request_auth.text.splitlines()
587
- if i.startswith("var SETTINGS = ")
588
- ]
+ settings_string = request_auth.text.split("var SETTINGS = ")
+ settings_string = settings_string[1].split("};")[0] + "}"
589
if len(settings_string) > 0:
590
- settings = json.loads(settings_string[0][15:-1])
591
-
+ settings = json.loads(settings_string)
592
state_code = str(settings["transId"]).split("=")[1]
593
csrf_token = settings["csrf"]
594
else:
0 commit comments