diff --git a/city_scrapers/spiders/cle_city_council.py b/city_scrapers/spiders/cle_city_council.py index 9d92da0..f0922c5 100644 --- a/city_scrapers/spiders/cle_city_council.py +++ b/city_scrapers/spiders/cle_city_council.py @@ -1,5 +1,3 @@ -from datetime import datetime - from city_scrapers_core.constants import CITY_COUNCIL, COMMITTEE from city_scrapers_core.items import Meeting from city_scrapers_core.spiders import LegistarSpider @@ -20,30 +18,25 @@ def parse_legistar(self, events): needs. """ for event in events: + start = self.legistar_start(event) + if start: + meeting = Meeting( + title=event["Name"]["label"], + description=self._parse_description(event), + classification=self._parse_classification(event), + start=start, + end=None, + all_day=False, + time_notes="", + location=self._parse_location(event), + links=self.legistar_links(event), + source=self.legistar_source(event), + ) - if self.legistar_start(event) is None: - start = datetime.strptime("01-01-01 00:00:00", "%y-%m-%d %H:%M:%S") - else: - start = self.legistar_start(event) - - print(self.legistar_start(event)) - meeting = Meeting( - title=event["Name"]["label"], - description=self._parse_description(event), - classification=self._parse_classification(event), - start=start, - end=None, - all_day=False, - time_notes="", - location=self._parse_location(event), - links=self.legistar_links(event), - source=self.legistar_source(event), - ) - - meeting["status"] = self._get_status(meeting) - meeting["id"] = self._get_id(meeting) + meeting["status"] = self._get_status(meeting) + meeting["id"] = self._get_id(meeting) - yield meeting + yield meeting def _parse_description(self, item): """Parse or generate meeting description."""