增加保存失败后自动检测登录状态

This commit is contained in:
2025-09-27 10:21:03 +08:00
parent 4cbc6bbf52
commit 8e0980e9b0

View File

@@ -325,6 +325,14 @@ def automate_browser(topic_id, title, driver, main_window, headers, cookies):
else:
log(f"话题 {topic_id} ({title}) 未找到保存按钮,截图保存", "ERROR")
driver.save_screenshot(f"save_not_found_{topic_id}.png")
# 检查登录状态
if not check_login_status(driver):
log("检测到登录已失效", "WARNING")
global is_logged_in
is_logged_in = False
send_webhook_notification("直播系统登录已失效,需要手动重新登录", True)
driver.close()
driver.switch_to.window(main_window)
return False