From 5ad9a195013e9d1550d5618d76384c4c7436a772 Mon Sep 17 00:00:00 2001 From: David Park Date: Wed, 18 Dec 2024 23:13:50 +0000 Subject: [PATCH] fix: change date format to project default for Merton Council --- uk_bin_collection/uk_bin_collection/councils/MertonCouncil.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uk_bin_collection/uk_bin_collection/councils/MertonCouncil.py b/uk_bin_collection/uk_bin_collection/councils/MertonCouncil.py index 0912ce3aee..e84066b009 100644 --- a/uk_bin_collection/uk_bin_collection/councils/MertonCouncil.py +++ b/uk_bin_collection/uk_bin_collection/councils/MertonCouncil.py @@ -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: