Skip to content

Commit

Permalink
redo cle_city_council
Browse files Browse the repository at this point in the history
use solution from Lien Dang 
isort/black/flake8
  • Loading branch information
haileyhoyat authored Oct 25, 2022
1 parent 021ffd9 commit 14fbe52
Showing 1 changed file with 17 additions and 24 deletions.
41 changes: 17 additions & 24 deletions city_scrapers/spiders/cle_city_council.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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."""
Expand Down

0 comments on commit 14fbe52

Please sign in to comment.