Skip to content

Fix NSM (North Somerset) scraper - #492

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

Fix NSM (North Somerset) scraper#492
symroe wants to merge 1 commit into
masterfrom
fix/NSM-scraper

Conversation

@symroe

@symroe symroe commented Aug 5, 2026

Copy link
Copy Markdown
Member

What broke

n-somerset.moderngov.co.uk now has Cloudflare Bot Management in front of it. When wreq (the Haskell HTTP client) requests http://n-somerset.moderngov.co.uk/mgWebService.asmx/GetCouncillorsByWard, Cloudflare returns 403 Forbidden rather than the XML data. The same block applies on HTTPS, and the council has been failing for 4 consecutive runs (since 2026-07-31).

What was fixed

Scrape results

Local verification was not possible in this run — the network proxy used in this environment blocks Chromium's TLS connections, causing connection resets when playwright tries to navigate to *.moderngov.co.uk. The fix is structurally identical to the fix applied in PR #407 (Bournemouth, Christchurch and Poole) which was merged and verified in Lambda. Scrape counts will be confirmed once CI runs in Lambda.


Generated by Claude Code

…dflare bypass

NSM — north-somerset.moderngov.co.uk now has Cloudflare Bot Management.
wreq gets 403 on both HTTP and HTTPS. Adding http_lib = playwright lets
headless Chromium solve the JS challenge — same pattern as PR #407 (BPC)
and recent PRs #472#488 for similar ModernGov instances.
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.

2 participants