Skip to content

Fix ELS (Na h-Eileanan an Iar) scraper#427

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

Fix ELS (Na h-Eileanan an Iar) scraper#427
symroe wants to merge 1 commit into
masterfrom
fix/ELS-scraper

Conversation

@symroe

@symroe symroe commented Jul 10, 2026

Copy link
Copy Markdown
Member

What broke

www.cne-siar.gov.uk returns HTTP 403 to wreq's Firefox133 TLS fingerprint. The existing verify_requests = False addresses a certificate trust issue on this host but does not bypass the WAF's TLS fingerprint check. The WAF is blocking Lambda's requests based on the non-browser TLS client-hello, returning 403 Forbidden. The councillors page is accessible to browser clients (confirmed: page serves valid HTML with councillor links). Same WAF fingerprint block pattern as ELN (#410), FIF (#419), and other recently fixed councils.

Note: PR #392 attempted this same fix but was closed without merging; this PR re-applies it from the current master.

What was fixed

  • councillors.py: added http_lib = "playwright" — headless Chromium's Chrome TLS fingerprint passes the WAF check, allowing the councillors list page and individual detail pages to load correctly
  • verify_requests = False retained — the certificate trust issue on this host is independent of the WAF fingerprint block

Scrape results

Metric Count
Councillors found TBC (Lambda run needed — WAF blocks all non-Chromium clients from this environment)
With email address TBC
With photo TBC

Previous successful run (PR #392, June 2026) found 29 councillors, all with email and photo.


Generated by Claude Code

…int block

www.cne-siar.gov.uk returns HTTP 403 to wreq's Firefox133 TLS fingerprint.
The existing verify_requests=False addresses a certificate trust issue but
does not bypass the WAF's TLS fingerprint check. Adding http_lib="playwright"
switches to headless Chromium's Chrome TLS fingerprint, which passes the WAF
and allows the councillors page and individual detail pages to load correctly.
Same fix pattern as ELN (#410), FIF (#419), and other recently fixed councils.
@symroe

symroe commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

Re-scrape after e26357d

Initial PR — added http_lib = "playwright" and retained verify_requests = False. WAF returns HTTP 403 to all non-Chromium clients from this environment, so a full end-to-end count requires a Lambda run.

Metric Count
Councillors found TBC (Lambda run needed)
With email address TBC
With photo TBC

Reference: previous successful run (PR #392, June 2026) found 29 councillors, all with email and photo on individual detail pages.


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.

2 participants