Skip to content

Fix MON (Monmouthshire) scraper#345

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

Fix MON (Monmouthshire) scraper#345
symroe wants to merge 1 commit into
masterfrom
fix/MON-scraper

Conversation

@symroe
Copy link
Copy Markdown
Member

@symroe symroe commented Jun 8, 2026

What broke

The https://democracy.monmouthshire.gov.uk certificate is not trusted by wreq's embedded BoringSSL CA bundle. Every request to the ModGov ASMX endpoint fails immediately with CERTIFICATE_VERIFY_FAILED. The dashboard error showed "HTTP 503 Service Unavailable" but local reproduction reveals the underlying cause is a TLS certificate validation failure.

What was fixed

  • Added verify_requests = False to the Scraper class in councillors.py

Scrape results

Metric Count
Councillors found 46
With email address 0
With photo 46

Note: Monmouthshire does not publish email addresses via their ModGov XML service — the <emailaddress> field is absent from all councillor records.


Generated by Claude Code

…ingSSL

The https://democracy.monmouthshire.gov.uk certificate is not trusted by
wreq's embedded BoringSSL CA bundle, causing CERTIFICATE_VERIFY_FAILED on
every request. Adding verify_requests = False bypasses TLS certificate
validation, allowing the ModGov ASMX endpoint to respond with councillor
data. We scrape read-only public data so MITM risk is acceptable.

Locally verified: 46 councillors, 46 with photos. The council does not
publish email addresses via the ModGov XML service.
@symroe
Copy link
Copy Markdown
Member Author

symroe commented Jun 8, 2026

Re-scrape after cecc8a9

Initial fix: verify_requests = False to bypass BoringSSL cert rejection on democracy.monmouthshire.gov.uk.

Verified locally with uv run manage.py councillors --council MON -v — completed in 1.9 seconds with no errors.

Metric Count
Councillors found 46
With email address 0
With photo 46

Emails: the <emailaddress> field is absent from all councillor records — Monmouthshire does not publish email addresses via this service.


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