Skip to content

Commit

Permalink
fix wakefield_gov_uk
Browse files Browse the repository at this point in the history
  • Loading branch information
5ila5 committed Dec 12, 2024
1 parent 80e932f commit ddb770b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 83 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,16 @@ def fetch(self) -> List[Collection]:
bin_type = section.find("strong").text.split(" ")[0]
prev_and_next_collection = section.select(".u-mb-2")
for collection in prev_and_next_collection:
collection_dates.add(
datetime.strptime(
collection.text.split(", ")[1].strip(), "%d %B %Y"
).date()
)
if ", " not in collection.text:
continue
try:
collection_dates.add(
datetime.strptime(
collection.text.split(", ")[1].strip(), "%d %B %Y"
).date()
)
except ValueError:
pass
for collection_date in collection_dates:
entries.append(
Collection(
Expand Down

This file was deleted.

0 comments on commit ddb770b

Please sign in to comment.