Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
admittedly slightly hippie-dippy way of fixing this but tbh at this point i just want this bug to be over with.

if self.legistar_start(event) is None, then make the start a passed time that will register the meeting on the Documenters.org website as 'passed' (i.e. a meeting that is already passed and shouldn't be assigned).
  • Loading branch information
haileyhoyat authored Oct 23, 2022
1 parent f7dfdfc commit 02d5e73
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions city_scrapers/spiders/cle_city_council.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from datetime import datetime
from tracemalloc import start
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 @@ -18,26 +20,30 @@ def parse_legistar(self, events):
needs.
"""
for event in events:

if (self.legistar_start(event) is None):
return
start = datetime.strptime("01-01-01 00:00:00", '%y-%m-%d %H:%M:%S')
else:
meeting = Meeting(
title=event["Name"]["label"],
description=self._parse_description(event),
classification=self._parse_classification(event),
start=self.legistar_start(event),
end=None,
all_day=False,
time_notes="",
location=self._parse_location(event),
links=self.legistar_links(event),
source=self.legistar_source(event),
)
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 02d5e73

Please sign in to comment.