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

@@ -532,8 +532,8 @@ function main(url, parameters, locales) {
let rate = Number($('#progressLabel').dataset.sent) / uptime.asSeconds();
let spm = parseFloat(Number(rate*60).toFixed(2));
$('#remainingLabel').innerText = rate > 0 ? `<span>${dayjs.duration((limit - index) / rate, 'second').humanize()}</span>` : '';
$('#remainingLabel').innerText += spm >= 1 ? `<span class="${spm > 8.33 ? 'rate warning' : 'rate'}">${spm} per minute</span>` : '';
$('#remainingLabel').innerHTML = rate > 0 ? `<span>${dayjs.duration((limit - index) / rate, 'second').humanize()}</span>` : '';
$('#remainingLabel').innerHTML += spm >= 1 ? `<span class="${spm > 8.33 ? 'rate warning' : 'rate'}">${spm} per minute</span>` : '';
}
}, 500);
}

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: