fix(weibo): 识别支付页拒绝并保护有效 CK 状态
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user