fix: EdinburghCityCouncil - accept real postcode + house number#1990
fix: EdinburghCityCouncil - accept real postcode + house number#1990InertiaUK wants to merge 1 commit into
Conversation
The old scraper was a pure date calculator that required magic tokens: paon="Tuesday" and postcode="Week 1". Users had to already know their collection schedule code, making it unusable for address-based lookups. Rewritten to resolve the street name automatically and look up the schedule code from the council's directory: - postcodes.io resolves postcode to lat/lng - Nominatim reverse-geocodes to get street name - Searches Edinburgh's /directory/10251/ for the street - Extracts calendar code (e.g. Tue_2) from the record page - Calculates dates using the same fortnightly rota logic Falls back to extracting street from paon if it contains more than just a house number (e.g. "157 Morningside Road").
|
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 49 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="Tuesday"andpostcode="Week 1"— users had to already know their collection schedule code. Unusable for any system that passes real addresses.Fix: Resolves the street name from postcode via postcodes.io + Nominatim reverse geocoding, then searches Edinburgh's waste collection directory at
/directory/10251/for the street, extracts the calendar code (e.g.Tue_2), and calculates dates using the same fortnightly rota logic.Changes:
EdinburghCityCouncil.py— full rewrite with street lookupinput.json— updated to use realpostcode+house_number(was magic tokens)Testing: Verified with EH10 4AX / 157 (Morningside Road) — returns 84 bins (Grey, Green, Glass across 28 weeks).