minor fix

This commit is contained in:
2025-08-28 13:37:00 +08:00
parent bf54ad9316
commit 24fca921ee
2 changed files with 5 additions and 5 deletions

View File

@@ -191,10 +191,9 @@ def main(driver: WebDriver):
tell('正在登陆')
click("#io-ox-topbar-account-dropdown-icon button.dropdown-toggle")
address = locate("#topbar-account-dropdown .mail").get_attribute('innerText')
parts = HumanName(address.split('@', 2)[0])
parts.capitalize(force=True)
outbox.put(Command('setAddress', parts.full_name, address))
tell(f'成功登录 {parts.full_name} ({address})')
person = HumanName(address.split('@', 2)[0])
person.capitalize(force=True)
tell(f'成功登录 {person.full_name} ({address})')
break
except: continue
@@ -255,6 +254,7 @@ def main(driver: WebDriver):
while True:
try:
outbox.put(Command('setAddress', person.full_name, address))
driver.switch_to.window(driver.window_handles[0])
filename = str(inbox.get())
buffer = BytesIO(inbox.get())

View File

@@ -1 +1 @@
.\..\venv\Scripts\pythonw.exe .\..\main.py --address "user@example.com" --password "example" --max-occurrence 5 --interval 10
.\..\venv\Scripts\pythonw.exe .\..\main.pyw --address "user@example.com" --password "example" --max-occurrence 5 --interval 10