From f711be61479edff9cecdf76092bdfb97a0607408 Mon Sep 17 00:00:00 2001 From: Lily Date: Fri, 15 Nov 2024 15:57:29 -0500 Subject: [PATCH] changed index of _parse_start fo chicago library spyder since going with the last item extracted causes an issue when there's multiple items with the strong css, like with the current chicago library website. --- city_scrapers/spiders/chi_library.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/city_scrapers/spiders/chi_library.py b/city_scrapers/spiders/chi_library.py index cd6b60324..cfd22eb13 100644 --- a/city_scrapers/spiders/chi_library.py +++ b/city_scrapers/spiders/chi_library.py @@ -74,7 +74,7 @@ def _parse_start(self, item, year): """ Parse start date and time. """ - dt_str = item.css("strong::text").extract()[-1] + dt_str = item.css("strong::text").extract()[0] return datetime.datetime.strptime( "{} {}".format(re.sub(r"[,\.]", "", dt_str), year), "%A %B %d %I %p %Y" )