try to fix relogin

This commit is contained in:
2025-07-09 17:22:31 +08:00
parent d56d2a3267
commit a33ff2c117
2 changed files with 11 additions and 7 deletions

View File

@ -83,6 +83,7 @@ class URP:
for attempt in range(1, max_retries + 1):
try:
response = func()
print(response.url)
URP._judge_logout(response)
return response
except (
@ -207,7 +208,7 @@ class URP:
@staticmethod
def _judge_logout(response: requests.Response):
"""检查账号是否在其他地方被登录"""
if "errorCode=concurrentSessionExpired" in response.url:
if "/login" in response.url:
raise ReloginException("有人登录了您的账号!")