fix: robust final block (safe screenshot/close), IMAP host param, env-driven paths; README: live run log 31.10
This commit is contained in:
@@ -183,7 +183,10 @@ with sync_playwright() as p:
|
||||
log("final page:", txt(pg, 200).replace("\n", " "), "|", pg.url[:80])
|
||||
if "blocked" not in txt(pg, 320):
|
||||
ok = True
|
||||
pg.screenshot(path=os.path.join(BASE, "z_final.png"))
|
||||
try:
|
||||
pg.screenshot(path=os.path.join(BASE, "z_final.png"), timeout=15000)
|
||||
except Exception as _e:
|
||||
log("shot err", type(_e).__name__)
|
||||
try:
|
||||
ks = pg.evaluate("() => (document.body.innerText.match(/ctxt_secret_[A-Za-z0-9]+/g) || null)")
|
||||
log("keys on page:", ks)
|
||||
@@ -192,7 +195,10 @@ with sync_playwright() as p:
|
||||
pg.url + "\n\n" + full)
|
||||
except Exception as e:
|
||||
log("dump err", type(e).__name__)
|
||||
pg.close()
|
||||
try:
|
||||
pg.close()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
used.add(MAIL); json.dump(sorted(used), open(USED, "w"))
|
||||
j = {}
|
||||
|
||||
Reference in New Issue
Block a user