Skip to content

feat: add caerphilly county borough council scraper#2093

Open
InertiaUK wants to merge 1 commit into
robbrad:masterfrom
InertiaUK:feat/caerphilly-council
Open

feat: add caerphilly county borough council scraper#2093
InertiaUK wants to merge 1 commit into
robbrad:masterfrom
InertiaUK:feat/caerphilly-council

Conversation

@InertiaUK
Copy link
Copy Markdown
Contributor

Summary

  • New scraper for Caerphilly County Borough Council (population ~181k, South Wales)
  • Uses ReCollect API (area CaerphillyCountyUK, service 50008)
  • Pure HTTP with requests - no Selenium needed
  • 3-step flow: postcode suggest, place_calendar address picker, per-address events
  • Caerphilly's ReCollect setup differs from other ReCollect councils - address-suggest returns postcode qualifiers only, so the scraper uses place_calendar's address picker (401 response containing address list) to resolve individual properties

Test plan

  • Tested with CF83 1AP house 100 (Nantgarw Road) - Monday collections
  • Also tested NP12 1AA house 1 - Thursday collections
  • Returns Recycling (weekly), Food and Garden (weekly), Refuse (fortnightly)
  • End-to-end verified through Kepthouse API

Uses ReCollect API (area CaerphillyCountyUK, service 50008). Pure HTTP.
3-step flow: postcode suggest, place_calendar address picker (401 with
address list), then per-address event fetch. Returns recycling (weekly),
food/garden (weekly), refuse (fortnightly).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

Warning

Rate limit exceeded

@InertiaUK has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 34 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0f94660e-48b9-467c-9187-3bf6391eb300

📥 Commits

Reviewing files that changed from the base of the PR and between 8ecf878 and b59b0d2.

📒 Files selected for processing (2)
  • uk_bin_collection/tests/input.json
  • uk_bin_collection/uk_bin_collection/councils/CaerphillyCountyBoroughCouncil.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
1 1 0 0
View the top 1 failed test(s) by shortest run time
::uk_bin_collection.tests.step_defs.test_validate_council
Stack Traces | 0s run time
.../tests/step_defs/test_validate_council.py:24: in <module>
    @pytest.fixture(params=get_council_list())
.../tests/step_defs/test_validate_council.py:19: in get_council_list
    data = json.load(file)
.../usr/lib/python3.12/json/__init__.py:293: in load
    return loads(fp.read(),
<frozen codecs>:322: in decode
    ???
E   UnicodeDecodeError: 'utf-8' codec can't decode byte 0x97 in position 41488: invalid start byte

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

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