update: try also recovery from address mismatched errors
This commit is contained in:
7
main.py
7
main.py
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user