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