From 6cdca11a0efe760cde20c55f6698cb5d4d94814c Mon Sep 17 00:00:00 2001 From: DarkCat09 Date: Mon, 29 May 2023 12:02:45 +0400 Subject: [PATCH] Logging in with cookie --- python_aternos/atclient.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/python_aternos/atclient.py b/python_aternos/atclient.py index 9bf739f..fa814b5 100644 --- a/python_aternos/atclient.py +++ b/python_aternos/atclient.py @@ -117,6 +117,15 @@ class Client: self.save_session(filename) except OSError: pass + + def login_with_session(self, session: str) -> None: + """Log in using ATERNOS_SESSION cookie + + Args: + session (str): Session cookie value + """ + + self.atconn.session.cookies['ATERNOS_SESSION'] = session def logout(self) -> None: """Log out from the Aternos account"""