Skip to content

WYC (Wychavon) scraper failing — ModGov server returning 503 and http_lib needs update #342

@symroe

Description

@symroe

Error (2026-06-07)

Connection reset during SSL handshake
Duration: 0.3s

Investigation

Two issues found:

1. Server returning 503

https://mgov.wychavon.gov.uk/modern.gov/mgWebService.asmx/GetCouncillorsByWard currently returns HTTP 503 Service Unavailable:

HTTP/2 503
content-length: 239
content-type: text/plain

The base domain (mgov.wychavon.gov.uk) also returns 503. This is the primary cause of failure.

2. http_lib = "requests" causing TLS fingerprint rejection

The scraper still uses http_lib = "requests" (left over from before the URL was fixed in PR #313). When tested with the default wreq client (removing http_lib = "requests"), the endpoint returns CERTIFICATE_VERIFY_FAILED — wreq's BoringSSL bundle does not trust the Wychavon cert.

The combination of these means:

  • With requests: "Connection reset during SSL handshake" (requests' TLS fingerprint is rejected by server/WAF)
  • With wreq: CERTIFICATE_VERIFY_FAILED (cert not trusted by BoringSSL)
  • With verify_requests = False (wreq, no cert check): 503 (server down)

What needs to happen

  1. Short term: Check whether mgov.wychavon.gov.uk is temporarily down or has moved.
  2. Code fix needed: Once the server is back, replace http_lib = "requests" with verify_requests = False (using wreq's Firefox TLS fingerprint instead of Python requests, which bypasses the TLS fingerprint rejection). The requests library is a last-resort option per our conventions and is causing the connection reset.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions