Skip to content

Commit 5dccfdc

Browse files
committed
fix: HarboroughDistrictCouncil
fix: HarboroughDistrictCouncil
1 parent a9f94d4 commit 5dccfdc

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

uk_bin_collection/uk_bin_collection/councils/HarboroughDistrictCouncil.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def parse_data(self, page: str, **kwargs) -> dict:
3434
response.raise_for_status() # Validate session initialization
3535

3636
params = {"Uprn": user_uprn}
37-
response = requests.post(URI, headers=headers, data=params, verify=False)
37+
response = session.post(URI2, data=params, verify=False)
3838

3939
# Check for service errors
4040
if response.status_code == 502:
@@ -43,20 +43,20 @@ def parse_data(self, page: str, **kwargs) -> dict:
4343
f"This is a temporary issue with the council's waste collection system. "
4444
f"Please try again later."
4545
)
46-
46+
4747
response.raise_for_status()
4848

4949
soup = BeautifulSoup(response.content, features="html.parser")
5050
bin_collection = soup.find(
5151
"div", {"class": "blocks block-your-next-scheduled-bin-collection-days"}
5252
)
53-
53+
5454
if bin_collection is None:
5555
raise ValueError(
5656
f"Could not find bin collection data for UPRN {user_uprn}. "
5757
"The council website may have changed or the UPRN may be invalid."
5858
)
59-
59+
6060
lis = bin_collection.find_all("li")
6161
for li in lis:
6262
try:

0 commit comments

Comments
 (0)