Skip to content

Fix FYL (Fylde) scraper#447

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

Fix FYL (Fylde) scraper#447
symroe wants to merge 1 commit into
masterfrom
fix/FYL-scraper

Conversation

@symroe

@symroe symroe commented Jul 21, 2026

Copy link
Copy Markdown
Member

What broke

The Fylde CMIS scraper (fylde.cmis.uk.com) was returning 0 councillors in Lambda. The wreq HTTP client uses a Firefox TLS fingerprint, which the CMIS site was detecting as a bot and serving a stripped-down page with no PE_People_PersonBlock divs. The site returns correct HTML to Python requests (OpenSSL TLS fingerprint) and curl, but serves anti-bot content to wreq. The scraper connected successfully (no connection error) but parsed an empty result set, triggering the "Not many councillors found (0)" guard.

What was fixed

  • Added http_lib = "requests" to the Scraper class — the Python requests library correctly retrieves all 37 councillor blocks
  • Added get_single_councillor override to extract councillor photos from the PenPicResize thumbnail image in each PE_People_PersonBlock div on the list page (all 37 councillors have photos available)

Scrape results

Metric Count
Councillors found 37
With email address 37
With photo 37

Opened by LGSF maintenance bot (2026-07-21)


Generated by Claude Code

…tion

The Fylde CMIS scraper was returning 0 councillors because the wreq
client's Firefox TLS fingerprint was being served an anti-bot page by
fylde.cmis.uk.com in the Lambda environment. Switching to http_lib =
"requests" (OpenSSL TLS) correctly retrieves the councillor listing
page with all PE_People_PersonBlock divs present.

Also adds photo extraction by reading the PenPicResize thumbnail from
each PersonBlock div in the list page — all 37 councillors have photos.
@symroe

symroe commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

Re-scrape after f4a6490

Initial fix: switched to http_lib = "requests" and added photo extraction from PenPicResize thumbnails.

Metric Count
Councillors found 37
With email address 37
With photo 37

Verified locally — scraper runs cleanly in ~52 seconds (fetches each councillor's detail page for party and email).


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