diff --git a/services/screenshots.py b/services/screenshots.py index 2c79e06..2b47b59 100644 --- a/services/screenshots.py +++ b/services/screenshots.py @@ -252,8 +252,8 @@ def take_screenshot_for_account( # 智能登录状态检查:只在必要时才刷新登录 should_refresh_login = not is_cookie_jar_fresh(cookie_path) - if should_refresh_login and attempt > 0: - # 只有在重试时才刷新登录,避免重复登录操作 + if should_refresh_login and attempt > 1: + # 重试时刷新登录(attempt > 1 表示第2次及以后的尝试) log_to_client("正在刷新登录态...", user_id, account_id) if not _ensure_login_cookies(account, proxy_config, custom_log): log_to_client("截图登录失败", user_id, account_id)