"""Dump the Duval Property Appraiser search page DOM to find real selectors.""" from __future__ import annotations import io, sys sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8", errors="replace") from playwright.sync_api import sync_playwright USER_AGENT = "AR-House/1.0 (real estate investment analysis)" with sync_playwright() as p: browser = p.chromium.launch(headless=True) page = browser.new_context(user_agent=USER_AGENT).new_page() page.set_default_timeout(15_000) # Try landing page first print("=" * 70) print("LANDING: https://paopropertysearch.coj.net/") print("=" * 70) page.goto("https://paopropertysearch.coj.net/", wait_until="domcontentloaded") print("Final URL:", page.url) print() # Dump ALL inputs on the page print("--- ALL elements ---") inputs = page.locator("input").all() for i, inp in enumerate(inputs[:30]): try: attrs = page.evaluate("""(el) => { const out = {}; for (const a of el.attributes) out[a.name] = a.value; return out; }""", inp.element_handle()) print(f" [{i}] {attrs}") except Exception as e: print(f" [{i}] (couldn't get attrs: {e})") print() print("--- ALL