Skip to content

Commit

Permalink
fix: change date format to project default for Merton Council
Browse files Browse the repository at this point in the history
  • Loading branch information
dp247 committed Dec 18, 2024
1 parent 3a6716d commit 5ad9a19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions uk_bin_collection/uk_bin_collection/councils/MertonCouncil.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ def parse_data(self, page: str, **kwargs) -> dict:
bin_type = cells[0].get_text().strip()
# Date is on the second cell, second paragraph, wrapped in p
collectionDate = None
for date_format in possible_formats:
for format in possible_formats:
try:
collectionDate = datetime.strptime(
cells[1].select("p > b")[2].get_text(strip=True), date_format
cells[1].select("p > b")[2].get_text(strip=True), format
)
break # Exit the loop if parsing is successful
except ValueError:
Expand Down

0 comments on commit 5ad9a19

Please sign in to comment.