Skip to content

Commit 825e593

Browse files
committed
fix: #1587
fix: #1587 - Hartlepool Borough Council
1 parent b0cffb6 commit 825e593

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

uk_bin_collection/uk_bin_collection/councils/HartlepoolBoroughCouncil.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ def parse_data(self, page: str, **kwargs) -> dict:
7373
for div in soup.find_all("div"):
7474
# Extract bin type and date from the span tag
7575
text = div.find("span").text.strip()
76-
bin_type, date = text.split(" ", 1)
76+
parts = text.split(" ")
77+
date = parts[-1] # assume the last token is the date
78+
bin_type = " ".join(parts[:-1])
7779
dict_data = {
7880
"type": bin_type,
7981
"collectionDate": date,

0 commit comments

Comments
 (0)