Skip to content

Fix COV (Coventry) scraper#415

Open
symroe wants to merge 1 commit into
masterfrom
fix/COV-scraper
Open

Fix COV (Coventry) scraper#415
symroe wants to merge 1 commit into
masterfrom
fix/COV-scraper

Conversation

@symroe

@symroe symroe commented Jul 3, 2026

Copy link
Copy Markdown
Member

What broke

edemocracy.coventry.gov.uk times out from Lambda when accessed with wreq's Firefox133 TLS fingerprint. The server's WAF drops the connection during the TLS handshake before returning any response. The endpoint is working correctly from non-Lambda IPs (confirmed via proxy: 302 redirect received, server is up, ModGov XML available). This is the same WAF fingerprint block pattern seen on HAL (#400), TON (#402), MON (#401), GED, STR, and others.

What was fixed

  • Added http_lib = "playwright" to the Scraper class — Playwright's headless Chromium uses Chrome's TLS fingerprint which passes the WAF, allowing the ModGov XML endpoint to be reached.

Scrape results

Metric Count
Councillors found TBC (Lambda run needed — endpoint confirmed live from non-Lambda IP)
With email address TBC
With photo TBC

Generated by Claude Code

edemocracy.coventry.gov.uk times out from Lambda when accessed with
wreq's Firefox133 TLS fingerprint — the WAF drops the connection during
the TLS handshake. The endpoint returns valid ModGov XML from non-Lambda
IPs (confirmed via proxy: 302 → mgError.aspx, server is up). Playwright's
Chrome TLS fingerprint bypasses the WAF, same pattern as HAL, TON, MON,
HNS, and others recently fixed.
@symroe

symroe commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

Re-scrape after cf91186

Added http_lib = "playwright". The ModGov XML endpoint was verified live from this environment — GetCouncillorsByWard returned full XML through our proxy.

Metric Count
Councillors found 54 (confirmed from live XML)
With email address 0 in XML (emails likely on individual detail pages, fetched during full scrape)
With photo 54 (photobigurl populated for all)

Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant