From 8e0980e9b05b2e62e21f2502401defadc2687433 Mon Sep 17 00:00:00 2001 From: 8butubb <1422726308@qq.com> Date: Sat, 27 Sep 2025 10:21:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BF=9D=E5=AD=98=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E5=90=8E=E8=87=AA=E5=8A=A8=E6=A3=80=E6=B5=8B=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main.py b/main.py index febdbec..e6f8103 100644 --- a/main.py +++ b/main.py @@ -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