diff --git a/plugins/tools/genshin.py b/plugins/tools/genshin.py index 9575fdbc..767e7de1 100644 --- a/plugins/tools/genshin.py +++ b/plugins/tools/genshin.py @@ -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: