mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-21 22:58:05 +00:00
🐛 Avoid refresh cookies when LabAccountNotFound
This commit is contained in:
parent
b36e515076
commit
06195cca5f
@ -256,6 +256,8 @@ class GenshinHelper(Plugin):
|
||||
try:
|
||||
yield client
|
||||
except InvalidCookies as exc:
|
||||
if exc.retcode == 10103:
|
||||
raise exc
|
||||
refresh = False
|
||||
cookie_model.status = CookiesStatusEnum.INVALID_COOKIES
|
||||
stoken = client.cookies.get("stoken")
|
||||
@ -268,6 +270,8 @@ class GenshinHelper(Plugin):
|
||||
logger.success("用户 %s 刷新 ltoken 成功", user_id)
|
||||
cookie_model.data = new_cookies
|
||||
cookie_model.status = CookiesStatusEnum.STATUS_SUCCESS
|
||||
except ValueError as _exc:
|
||||
logger.info("用户 user_id[%s] Cookies 不完整 [%s]", cookie_model.user_id, str(_exc))
|
||||
except InvalidCookies:
|
||||
logger.info("用户 user_id[%s] Cookies 已经过期", cookie_model.user_id)
|
||||
except SimnetBadRequest as _exc:
|
||||
|
Loading…
Reference in New Issue
Block a user