Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-translate/blob/main/demo/check.py # aien-translate aien-dev/aien-translate Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien-translate / demo / check.py` 17 lines · 833 bytes Raw Blame History 1 """Load the demo page with the real translate.js and report what it shows.""" 2 import json, sys 3 from playwright.sync_api import sync_playwright 4 5 url = sys.argv[1] 6 with sync_playwright() as p: 7 b = p.chromium.launch() 8 pg = b.new_page() 9 reqs = [] 10 pg.on("request", lambda r: reqs.append(r.url) if r.url.endswith(".json") or ".json?" in r.url else None) 11 pg.on("console", lambda m: print("console:", m.text[:200]) if m.type in ("error", "warning") else None) 12 pg.goto(url) 13 pg.wait_for_function("document.querySelector('h1').innerText.indexOf('操作系统') >= 0", timeout=120000) 14 pg.wait_for_timeout(2000) 15 out = pg.evaluate("""() => [...document.querySelectorAll('h1,p,button')].map(e => e.innerText)""") 16 print(json.dumps({"page": out, "requests": reqs}, ensure_ascii=False, indent=1)) 17 b.close()