Skip to content

Commit

Permalink
Merge pull request #53 from haileyhoyat/main
Browse files Browse the repository at this point in the history
Update cle_design_review.py and cle_planning_commission
  • Loading branch information
skorasaurus authored Aug 23, 2022
2 parents f300c7d + ce268f2 commit 66aa07c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
7 changes: 5 additions & 2 deletions city_scrapers/spiders/cle_design_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,11 @@ def parse(self, response):

# Start by looking through the agendas for existing meetings
for agenda in commitee_agenda_list.css("div.dropdown-menu a.dropdown-item"):
month_str, day_str = (
agenda.css("*::text").extract_first().strip().split(" ")
month_str = (
agenda.css("*::text").extract_first().strip().split(" ")[0]
)
day_str = (
agenda.css("*::text").extract_first().strip().split(" ")[1]
)
year_str = self._parse_year_from_agenda_link(agenda)

Expand Down
20 changes: 17 additions & 3 deletions city_scrapers/spiders/cle_planning_commission.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,17 @@ def parse(self, response):

# Start by looking through the agendas for existing meetings
for agenda in commission_agendas.css("div.dropdown-menu a.dropdown-item"):
'''
month_str, day_str = (
agenda.css("*::text").extract_first().strip().split(" ")
)
'''
month_str = (
agenda.css("*::text").extract_first().strip().split(" ")[0]
)
day_str = (
agenda.css("*::text").extract_first().strip().split(" ")[1]
)

year_str = self._parse_year_from_link(agenda)

Expand Down Expand Up @@ -201,7 +209,13 @@ def _dropdown_to_key(self, item):
year-month-day such as 2021-dec-3rd.
"""
name = item.css("::text").extract_first()
[month, day] = name.split(" ")
month = month[0:3].lower()
#[month, day] = name.split(" ")
#month = month[0:3].lower()
month_str = (
item.css("*::text").extract_first().strip().split(" ")[0]
)
day_str = (
item.css("*::text").extract_first().strip().split(" ")[1]
)
year = self._parse_year_from_link(item)
return f"{year}-{month}-{day}"
return f"{year}-{month_str}-{day_str}"

0 comments on commit 66aa07c

Please sign in to comment.