Scraping tools and docs used for debugging
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Eddy Hintze a7ce272123 Initial commit: webdriver/CDP scraper debugging tools
- network_snapshot.py / live_network_capture.py: SeleniumBase CDP-mode
  scripts that capture network requests, console errors, and page source
- docs/debugging-webdriver-scrapers.md: methodology + case studies
- uv-managed Python 3.12+ project, scripts default output to gitignored tmp/
2026-07-11 11:21:12 -04:00
docs Initial commit: webdriver/CDP scraper debugging tools 2026-07-11 11:21:12 -04:00
scripts Initial commit: webdriver/CDP scraper debugging tools 2026-07-11 11:21:12 -04:00
.gitignore Initial commit: webdriver/CDP scraper debugging tools 2026-07-11 11:21:12 -04:00
pyproject.toml Initial commit: webdriver/CDP scraper debugging tools 2026-07-11 11:21:12 -04:00
README.md Initial commit: webdriver/CDP scraper debugging tools 2026-07-11 11:21:12 -04:00
uv.lock Initial commit: webdriver/CDP scraper debugging tools 2026-07-11 11:21:12 -04:00

scraping-debugging-tools

Generic, site-agnostic tools and docs for figuring out why a browser-driven (webdriver/CDP) scraper is broken — blank pages, hangs, wrong content — instead of guessing.

Start here: docs/debugging-webdriver-scrapers.md

Scripts

Requires uv and Python 3.12+ (uv will fetch a matching interpreter automatically if you don't have one).

uv sync

# What actually loaded? Any failed requests? Does the page reload mid-load?
uv run scripts/network_snapshot.py "<url>" \
    --wait 20 \
    --wait-for-selector '<css selector for the content that should render>' \
    --proxy "user:pass@host:port"   # optional

# Live per-request detail (e.g. the remote IP a request exited on)
uv run scripts/live_network_capture.py "<neutral_url>" "<target_url>"

Both scripts drive a real Chrome via SeleniumBase's CDP mode and dump their findings (network requests, console errors, page source) as JSON/HTML for inspection. By default they write to tmp/<script name>/ in the repo root (gitignored) so the output is right there in your IDE's file tree — pass --out-dir to put it somewhere else. See the docs for how to read the output and when to reach for which script.

Layout

docs/     methodology + worked case studies
scripts/  the actual tools
tmp/      gitignored scratch space - default output dir for scripts/