Skip to content

feat: add tower hamlets council scraper#2090

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

feat: add tower hamlets council scraper#2090
InertiaUK wants to merge 1 commit into
robbrad:masterfrom
InertiaUK:feat/tower-hamlets-council

Conversation

@InertiaUK
Copy link
Copy Markdown
Contributor

Summary

  • New scraper for London Borough of Tower Hamlets (population ~310k)
  • Uses AchieveForms (Granicus) form with Whitespace waste management backend
  • Selenium-based: navigates iframe, enters postcode, selects address via JavaScript (avoids Selenium stale element issues with DOM rebuilds)
  • Reads timeband data from hidden form fields (AM/PM collection windows)
  • Works for timebanded daily-collection streets (covers most of Tower Hamlets)

Notes

  • Tower Hamlets has two collection models: timebanded (daily) and weekly
  • The council's online form only shows data for timebanded streets
  • Non-timebanded weekly streets return no schedule data from the form

Test plan

  • Tested with E14 0EG, house number 225 (East India Dock Road) - daily collection with AM/PM timebands
  • Returns 7 days of daily collection dates with time windows
  • End-to-end verified through Kepthouse API

Uses AchieveForms (Granicus) with Whitespace backend. Selenium-based:
navigates iframe form, enters postcode, selects address via JavaScript
to avoid stale element issues. Reads timeband data from hidden fields.
Works for timebanded daily-collection streets (most of Tower Hamlets).

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 21 minutes and 49 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: 8b486b06-9f7c-4771-b84f-fb7326ea1e6a

📥 Commits

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

📒 Files selected for processing (2)
  • uk_bin_collection/tests/input.json
  • uk_bin_collection/uk_bin_collection/councils/TowerHamletsCouncil.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