From 69fe47b19ba8a62c2cc71e58639f42c3ab4aa898 Mon Sep 17 00:00:00 2001 From: break27 Date: Fri, 22 Aug 2025 11:24:52 +0800 Subject: [PATCH] update: save instead of deleting drafts --- 邮件批量发送.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/邮件批量发送.py b/邮件批量发送.py index 6bb1ee5..e029fcc 100644 --- a/邮件批量发送.py +++ b/邮件批量发送.py @@ -362,13 +362,11 @@ def main(driver: WebDriver): while mails := driver.find_elements(By.CSS_SELECTOR, "div.io-ox-mail-compose-window"): try: - # 关闭过期邮件 click("button[data-action='close']", parent=mails[0]) - # 删除过期邮件 - click("div.modal-footer button[data-action='delete']") + click("div.modal-footer button[data-action='savedraft']") except Exception as e: print(f"[警告] 关闭邮件时发生了错误:{e}") - continue + break if attempt < args.retry: continue