From 2657ad61eba5bd922ed9316bb6554343d28ea06c Mon Sep 17 00:00:00 2001 From: Ryu1845 Date: Sat, 19 Feb 2022 13:20:48 +0100 Subject: [PATCH] fix login --- twspace_dl/login.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/twspace_dl/login.py b/twspace_dl/login.py index d976fe0..3033016 100644 --- a/twspace_dl/login.py +++ b/twspace_dl/login.py @@ -118,6 +118,8 @@ def login(self) -> str: request_flow = self.session.post( self.task_url, headers=self._headers, json=self._account_dup_check_data ).json() + if "auth_token" in request_flow.cookies.keys(): + return str(request_flow.cookies["auth_token"]) if "flow_token" in request_flow.keys(): self.flow_token = request_flow["flow_token"] # Sometimes it doesn't check account duplication