update: try also recovery from address mismatched errors

This commit is contained in:
2025-08-29 09:28:38 +08:00
parent 29e953673d
commit b82fa876de
3 changed files with 5 additions and 2 deletions

View File

@@ -361,12 +361,15 @@ def main(driver: WebDriver):
print('[信息] 正在发送:%s (%.2f %%)' % (recipient, current / limit * 100))
if (target := get_address()) != address:
raise Exception(f'邮件发件地址与设定不一致\n>> {address}\n>> {target}')
exception = Exception(f'邮件发件地址与设定不一致\n>> {address}\n>> {target}')
if not parameters.get('recovery'): raise exception
tell(None, exception, level=1)
if (target := get_subject()) != subject:
exception = Exception(f'邮件主题与设定不一致\n>> {subject}\n>> {target}')
condition = EC.presence_of_element_located
if not parameters.get('recovery'): raise exception
tell(None, exception, level=1)
# 打开存档
click("li[data-id='default0/Archives'] li.folder:nth-child(1)", condition)
ready(driver)