Skip to content

Commit

Permalink
WV: Events: manual time fix
Browse files Browse the repository at this point in the history
  • Loading branch information
showerst committed Jan 7, 2025
1 parent f68797b commit 663a1e1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scrapers/wv/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ def scrape_meeting_page(self, url):
yield event

def clean_date(self, when):
print(f"before {when}")
# Remove all text after the third comma to make sure no extra text
# is included in the date. Required to correctly parse text like this:
# "Friday, March 3, 2023, Following wrap up of morning agenda"
Expand Down Expand Up @@ -193,6 +194,7 @@ def clean_date(self, when):
when = when.replace("22021", "2021")
when = when.replace("20201", "2021")
when = when.replace("20202", "2020")
when = when.replace("9:AM", "9:00AM")
# Convert 1:300PM -> 1:30PM
when = re.sub(r"(\d0)0([ap])", r"\1\2", when, flags=re.IGNORECASE)

Expand All @@ -202,4 +204,5 @@ def clean_date(self, when):
if when == "March 1, 2022, PM":
when = "March 1, 2022, 1:00 PM"

print(f"after {when}")
return when

0 comments on commit 663a1e1

Please sign in to comment.