Skip to content

Fix NYE (North Yorkshire) scraper#429

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

Fix NYE (North Yorkshire) scraper#429
symroe wants to merge 1 commit into
masterfrom
fix/NYE-scraper

Conversation

@symroe

@symroe symroe commented Jul 13, 2026

Copy link
Copy Markdown
Member

What broke

The edemocracy.northyorks.gov.uk ModGov endpoint rejects wreq's Firefox TLS fingerprint with a connection reset during the SSL handshake (ConnectionReset, code 104). From a standard HTTP client (curl) the endpoint returns HTTP 200 with valid XML. This is consistent with the server running WAF-level TLS fingerprint filtering that blocks wreq's Firefox133 client hello while accepting standard browser fingerprints.

What was fixed

  • Added http_lib = "playwright" to Scraper — Playwright uses Chromium's Chrome TLS fingerprint which the server accepts, bypassing the TLS fingerprint block

Scrape results

Verified from the live endpoint (curl via non-Lambda IP):

Metric Count
Councillors found 90
With email address 88
With photo 90

Note: local playwright testing was not possible in this build environment (HTTPS inspection proxy causes ERR_CONNECTION_RESET for direct Chromium connections). The endpoint is confirmed to return valid councillor XML from non-Lambda IPs; playwright on Lambda uses the same Chrome fingerprint as curl's Chrome user agent and should succeed.


Generated by Claude Code

The edemocracy.northyorks.gov.uk ModGov endpoint rejects wreq's Firefox
TLS fingerprint with a connection reset during the SSL handshake. From
a non-Lambda IP, curl returns HTTP 200 with valid XML (90 councillors,
88 emails, 90 photos). Adding http_lib = "playwright" routes requests
through Chromium's Chrome TLS fingerprint, which the server accepts.

Local playwright testing is not possible from this environment (HTTPS
inspection proxy causes ERR_CONNECTION_RESET for direct Chromium
connections), but the endpoint is confirmed accessible and returning
valid councillor data.
@symroe

symroe commented Jul 13, 2026

Copy link
Copy Markdown
Member Author

Re-scrape after 6c2ce1b

Added http_lib = "playwright" to bypass wreq TLS fingerprint rejection. Endpoint data verified via curl (non-Lambda IP) — playwright on Lambda uses the same Chrome TLS fingerprint as curl and should succeed where wreq fails.

Metric Count
Councillors found 90
With email address 88
With photo 90

Note: local playwright test was blocked by the HTTPS inspection proxy in this build environment (ERR_CONNECTION_RESET before reaching the server). The numbers above are from a direct curl of the XML endpoint, which is what playwright would receive on Lambda.


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