minor fix
This commit is contained in:
14
邮件批量发送脚本.py
14
邮件批量发送脚本.py
@@ -197,9 +197,6 @@ def main():
|
|||||||
wait = WebDriverWait(driver, timeout=args.timeout)
|
wait = WebDriverWait(driver, timeout=args.timeout)
|
||||||
wait.until_not(lambda x: x.find_element(By.CSS_SELECTOR, ".io-ox-busy"))
|
wait.until_not(lambda x: x.find_element(By.CSS_SELECTOR, ".io-ox-busy"))
|
||||||
|
|
||||||
# 点击活动窗口
|
|
||||||
click("div.io-ox-mail-compose-window div.floating-header")
|
|
||||||
|
|
||||||
# 填入收件人
|
# 填入收件人
|
||||||
wrapper = locate("div.io-ox-mail-compose-window div[data-extension-id='to'] > div.mail-input")
|
wrapper = locate("div.io-ox-mail-compose-window div[data-extension-id='to'] > div.mail-input")
|
||||||
to = locate("input.token-input.tt-input[tabindex='0']", parent=wrapper)
|
to = locate("input.token-input.tt-input[tabindex='0']", parent=wrapper)
|
||||||
@@ -233,12 +230,15 @@ def main():
|
|||||||
# 删除过期邮件
|
# 删除过期邮件
|
||||||
click("div.modal-footer button[data-action='delete']")
|
click("div.modal-footer button[data-action='delete']")
|
||||||
break
|
break
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
print('[信息] 程序中断')
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f'[警告] 发生错误:{e}')
|
print(f'[警告] 发生错误:{e}')
|
||||||
key = input('[????] 重试 (R) / 跳过 (S) / 取消 (C): ')
|
|
||||||
if key in ['R', 'r']: continue
|
key = input('[????] 重试 (R) / 跳过 (S) / 取消 (C): ')
|
||||||
elif key in ['S', 's']: break
|
if key in ['R', 'r']: continue
|
||||||
else: active = False
|
elif key in ['S', 's']: break
|
||||||
|
else: active = False
|
||||||
|
|
||||||
if input('[????] 是否保存到文件?确定 (Y) / 取消 (N): ') in ['Y', 'y']:
|
if input('[????] 是否保存到文件?确定 (Y) / 取消 (N): ') in ['Y', 'y']:
|
||||||
print(f'[信息] 正在写入文件:{args.input}')
|
print(f'[信息] 正在写入文件:{args.input}')
|
||||||
|
|||||||
Reference in New Issue
Block a user