diff --git a/uk_bin_collection/uk_bin_collection/councils/WestOxfordshireDistrictCouncil.py b/uk_bin_collection/uk_bin_collection/councils/WestOxfordshireDistrictCouncil.py index e6439c4c34..99b39edbd7 100644 --- a/uk_bin_collection/uk_bin_collection/councils/WestOxfordshireDistrictCouncil.py +++ b/uk_bin_collection/uk_bin_collection/councils/WestOxfordshireDistrictCouncil.py @@ -86,6 +86,13 @@ def parse_data(self, page: str, **kwargs) -> dict: r"[^a-zA-Z0-9,\s]", "", columns[0].get_text() ).strip() + if columns[0].get_text() == "Today": + collection_day = datetime.now().strftime("%a, %d %B") + elif columns[0].get_text() == "Tomorrow": + collection_day = (datetime.now() + timedelta(days=1)).strftime( + "%a, %d %B" + ) + # Parse the date from the string parsed_date = datetime.strptime(collection_day, "%a, %d %B") if parsed_date < datetime(