Skip to content

Fix FLN (Flintshire) scraper#421

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

Fix FLN (Flintshire) scraper#421
symroe wants to merge 1 commit into
masterfrom
fix/FLN-scraper

Conversation

@symroe

@symroe symroe commented Jul 7, 2026

Copy link
Copy Markdown
Member

What broke

cyfarfodyddpwyllgor.siryfflint.gov.uk has been returning 503 or timing out from Lambda for 3 consecutive days (2026-07-03–05). The endpoint serves valid XML to non-Lambda clients (200 OK, 62 councillors returned), confirming the issue is a WAF fingerprint block on wreq's Firefox TLS client-hello rather than a server outage. The existing verify_requests = False addresses a certificate trust issue on this host but does not bypass the WAF's TLS fingerprint check.

What was fixed

Scrape results

Metric Count
Councillors found 62 (confirmed from XML)
With email address TBC (Lambda run needed — individual councillor pages fetched during scrape)
With photo 61 (confirmed from <photobigurl> in XML; 1 vacancy has placeholder image)

Generated by Claude Code

…gerprint block\n\nThe ModGov endpoint at cyfarfodyddpwyllgor.siryfflint.gov.uk returns 503 or\ntimes out when accessed from Lambda using wreq's Firefox TLS fingerprint. The\nendpoint serves valid XML (62 councillors, 61 with photos) to non-Lambda clients,\nconfirming this is a WAF fingerprint block rather than a server outage.\n\nAdding http_lib = \"playwright\" switches to headless Chromium's Chrome TLS\nfingerprint, which the WAF allows through. The existing verify_requests = False\nis retained as the certificate issue on this host is independent of the WAF block.\nSame pattern as DAC (#416), LAC (#420), HNS (#405), and others."
@symroe

symroe commented Jul 7, 2026

Copy link
Copy Markdown
Member Author

Re-scrape after d62fff7

Initial fix: added http_lib = "playwright" alongside existing verify_requests = False to bypass WAF TLS fingerprint block.

Data confirmed from live GetCouncillorsByWard XML endpoint (fetched from non-Lambda IP):

Metric Count
Councillors found 62
With email address TBC (Lambda run needed — emails are on individual councillor detail pages)
With photo 61 (from <photobigurl> in XML; 1 vacancy record has a placeholder image path)

The ModGov XML endpoint is confirmed live and returning full data. Email count will populate after the next Lambda run with Playwright.


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