Skip to content

Commit a5cb787

Browse files
committed
fix: Reworked Cumberland Council to cater for postcode addition
1 parent 2051201 commit a5cb787

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

uk_bin_collection/tests/input.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,8 +628,9 @@
628628
"LAD24CD": "E06000063"
629629
},
630630
"CumberlandCouncil": {
631-
"uprn": "100110734613",
632-
"url": "https://waste.cumberland.gov.uk",
631+
"postcode": "CA6 5PH",
632+
"uprn": "10009457328",
633+
"url": "https://waste.cumberland.gov.uk/renderform?t=25&k=E43CEB1FB59F859833EF2D52B16F3F4EBE1CAB6A",
633634
"wiki_name": "Cumberland",
634635
"wiki_note": "Use [FindMyAddress](https://www.findmyaddress.co.uk/search) to find your UPRN.",
635636
"LAD24CD": "E06000063"

uk_bin_collection/uk_bin_collection/councils/CumberlandCouncil.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class CouncilClass(AbstractGetBinDataClass):
1616
def parse_data(self, page: str, **kwargs) -> dict:
1717

1818
user_uprn = kwargs.get("uprn")
19+
postcode = kwargs.get("postcode")
1920
check_uprn(user_uprn)
2021
bindata = {"bins": []}
2122

@@ -57,6 +58,7 @@ def parse_data(self, page: str, **kwargs) -> dict:
5758
"TriggerCtl": "",
5859
"FF265": f"U{user_uprn}",
5960
"FF265lbltxt": "Please select your address",
61+
"FF265-text": postcode
6062
}
6163

6264
# print(payload)

wiki/Councils.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1158,9 +1158,10 @@ Note: Pass the house number and postcode in their respective parameters.
11581158

11591159
### Cumberland Borough Council
11601160
```commandline
1161-
python collect_data.py CumberlandCouncil https://waste.cumberland.gov.uk -u XXXXXXXX
1161+
python collect_data.py CumberlandCouncil https://waste.cumberland.gov.uk -u XXXXXXXX -p "XXXX XXX"
11621162
```
11631163
Additional parameters:
1164+
- `-p` - postcode
11641165
- `-u` - UPRN
11651166

11661167
Note: Use [FindMyAddress](https://www.findmyaddress.co.uk/search) to find your UPRN.

0 commit comments

Comments
 (0)