Skip to content

Fix RFW (Renfrewshire) scraper - #505

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

Fix RFW (Renfrewshire) scraper#505
symroe wants to merge 1 commit into
masterfrom
fix/RFW-scraper

Conversation

@symroe

@symroe symroe commented Aug 14, 2026

Copy link
Copy Markdown
Member

What broke

Individual CMIS councillor detail pages at renfrewshire.cmis.uk.com take ~13 seconds to load from standard connections. Lambda's previous 20-second timeout was too close to that threshold, and the CMIS server appears to throttle or slow connections from Lambda's IP range — the most recent run took 201 seconds before timing out mid-councillor-list.

The error:

is_timeout error: wreq::Error { kind: Request, uri: https://renfrewshire.cmis.uk.com/renfrewshire/Councillors/tabid/63/ctl/ViewCMIS_Person/mid/383/id/45/ScreenMode/Alphabetical/Default.aspx, source: TimedOut }

What was fixed

  • Replaced http_lib with "playwright" — browser-level fingerprinting bypasses IP-based throttling that wreq encounters on Lambda
  • Increased timeout from 20s to 60s to accommodate the inherently slow CMIS detail pages

Scrape results

The councillors list page (/renfrewshire/Councillors.aspx) returns 43 PE_People_PersonBlock elements and is accessible. Full email/photo counts require a Lambda run since individual detail pages time out from the dev environment (the same throttling that caused this failure).

Metric Count
Councillors found 43 (list page count)
With email address TBC (Lambda run needed)
With photo TBC (Lambda run needed)

Generated by Claude Code

Individual CMIS councillor detail pages at renfrewshire.cmis.uk.com take
~13 seconds to load from standard connections. Lambda's 20-second timeout
was too tight, and the CMIS server appears to throttle or slow connections
from Lambda's IP range (total run time 201s before timeout).

Switching to http_lib = "playwright" provides browser-level fingerprinting
that bypasses IP-based throttling. Timeout increased to 60s to accommodate
the slow CMIS responses.
@symroe

symroe commented Aug 14, 2026

Copy link
Copy Markdown
Member Author

Re-scrape after 0a47d14

Switched to http_lib = "playwright" and timeout = 60 to address Lambda IP throttling on CMIS individual detail pages.

The councillors list page (/renfrewshire/Councillors.aspx) is accessible and returns 43 PE_People_PersonBlock elements. Individual detail pages at renfrewshire.cmis.uk.com load in ~13 seconds from standard connections but time out from Lambda's IP range — playwright's browser fingerprint is expected to bypass this throttling.

Metric Count
Councillors found 43 (list page verified)
With email address TBC — individual pages unreachable from dev environment
With photo TBC — individual pages unreachable from dev environment

Full counts will be available after the next Lambda run.


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