fix(weibo): 识别支付页拒绝并保护有效 CK 状态

This commit is contained in:
yml2213
2026-11-08 10:04:05 +08:00
parent b7f34df04d
commit ffbe0f41f5
4 changed files with 94 additions and 6 deletions
+7 -4
View File
@@ -166,10 +166,13 @@ def _mark_manual_failure(
account: WeiboAccount,
exc: Exception,
) -> None:
account.ck_check_status = _error_status(exc)
account.ck_check_message = str(exc)
account.ck_checked_at = _now()
db.commit()
"""只有明确登录态失效才改动 CK 状态,业务失败不能把有效 CK 标坏。"""
if isinstance(exc, WeiboAuthError):
account.ck_check_status = "invalid"
account.ck_check_message = str(exc)
account.ck_checked_at = _now()
db.commit()
def query_weibo_mall(