pgh-public-meetings / city-scrapers-pitt

Pittsburgh City Scrapers: sourcing public meetings in Pittsburgh
https://pgh-public-meetings.github.io/events/
MIT License
19 stars 66 forks source link

Fix pitt_urbandev date parsing logic #190

Closed ben-nathanson closed 3 years ago

ben-nathanson commented 3 years ago

This resolves #169.

The issue was a HTML element describing the date of the meeting. This element normally would look something like "October 21, 2020". In one case however we had something like "October 21, 2020 - Regular Meeting", which didn't match the expression given to the date parser, leading us to a ValueError.

The fix was to add a regex matcher to find the date string within the raw string and pass that onto the date parser.