diff --git a/city_scrapers/spiders/cle_design_review.py b/city_scrapers/spiders/cle_design_review.py index e03da92..b02476f 100644 --- a/city_scrapers/spiders/cle_design_review.py +++ b/city_scrapers/spiders/cle_design_review.py @@ -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) diff --git a/city_scrapers/spiders/cle_planning_commission.py b/city_scrapers/spiders/cle_planning_commission.py index 9f4b0fe..61e956c 100644 --- a/city_scrapers/spiders/cle_planning_commission.py +++ b/city_scrapers/spiders/cle_planning_commission.py @@ -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) @@ -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}"