fix: ThurrockCouncil - accept real postcode + house number#1991
fix: ThurrockCouncil - accept real postcode + house number#1991InertiaUK wants to merge 1 commit into
Conversation
The old scraper was a pure date calculator that required magic tokens: paon="Monday" and postcode="Round A". Users had to already know their collection day and round, making it unusable for address-based lookups. Rewritten to resolve the street name and match against the council's published street tables: - postcodes.io resolves postcode to lat/lng - Nominatim reverse-geocodes to get street name and town - Scrapes the relevant alphabetical page from thurrock.gov.uk - Matches street name (with town disambiguation) - Calculates dates using the same alternating rota logic Falls back to extracting street from paon if it contains more than just a house number (e.g. "10 Mace Court").
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 59 minutes and 39 seconds.Comment |
|
Included in May 2026 Release PR #1992. Closing. |
Replaces the magic-token date calculator with a real address-based lookup.
Problem: The old scraper required
paon="Monday"andpostcode="Round A"— users had to already know their collection day and round. Unusable for any system that passes real addresses.Fix: Resolves the street name from postcode via postcodes.io + Nominatim reverse geocoding, then scrapes the relevant alphabetical page from thurrock.gov.uk to find the matching street entry (with town disambiguation for streets that exist in multiple towns). Calculates dates using the same alternating rota logic.
Changes:
ThurrockCouncil.py— full rewrite with street lookupinput.json— updated to use realpostcode+house_number(was magic tokens)Testing: Verified with RM17 6TX / 10 (Mace Court, Grays) — returns 140 bins (Green/Grey, Blue, Brown, Food across 28 weeks).