minor fix

This commit is contained in:
2025-09-04 13:06:45 +08:00
parent 0974777be6
commit 355cdbd2e6
2 changed files with 3 additions and 4 deletions

View File

@@ -227,7 +227,7 @@ def main(driver: WebDriver):
def get_address():
try:
element = driver.find_element(By.CSS_SELECTOR, "header div.from")
address = re.search(r'[^<\s]+@[^>\s]+', element.text[6:])[0]
address = re.search(r'[^<\s]+@[^>\s]+', element.text)[0]
return address
except:
return None
@@ -369,7 +369,6 @@ def main(driver: WebDriver):
if (target := get_address()) != address:
exception = Exception(f'邮件发件地址与设定不一致\n>> {address}\n>> {target}')
if not parameters.get('recovery'): raise exception
tell(None, exception, level=1)
if (target := get_subject()) != subject: