Fix FYL (Fylde) scraper#447
Open
symroe wants to merge 1 commit into
Open
Conversation
…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.
Member
Author
Re-scrape after f4a6490Initial fix: switched to
Verified locally — scraper runs cleanly in ~52 seconds (fetches each councillor's detail page for party and email). Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 noPE_People_PersonBlockdivs. The site returns correct HTML to Pythonrequests(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
http_lib = "requests"to the Scraper class — the Pythonrequestslibrary correctly retrieves all 37 councillor blocksget_single_councilloroverride to extract councillor photos from thePenPicResizethumbnail image in eachPE_People_PersonBlockdiv on the list page (all 37 councillors have photos available)Scrape results
Opened by LGSF maintenance bot (2026-07-21)
Generated by Claude Code