Skip to content

Commit

Permalink
fix: WestOxfordshireDistrictCouncil
Browse files Browse the repository at this point in the history
  • Loading branch information
m26dvd committed Oct 31, 2024
1 parent 6ac6397 commit 8e2aaaf
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 8e2aaaf

Please sign in to comment.