From 5c2dd82eea45cbe6e3e4b97f573e60533e4c71e7 Mon Sep 17 00:00:00 2001 From: Daniel Simmons-Ritchie <37225902+SimmonsRitchie@users.noreply.github.com> Date: Tue, 30 Apr 2024 14:54:42 -0500 Subject: [PATCH] Deprecate spider chi_ssa_16 --- city_scrapers/spiders/chi_ssa_16.py | 114 ----- tests/files/chi_ssa_16.html | 709 ---------------------------- tests/test_chi_ssa_16.py | 101 ---- 3 files changed, 924 deletions(-) delete mode 100644 city_scrapers/spiders/chi_ssa_16.py delete mode 100644 tests/files/chi_ssa_16.html delete mode 100644 tests/test_chi_ssa_16.py diff --git a/city_scrapers/spiders/chi_ssa_16.py b/city_scrapers/spiders/chi_ssa_16.py deleted file mode 100644 index b406050c9..000000000 --- a/city_scrapers/spiders/chi_ssa_16.py +++ /dev/null @@ -1,114 +0,0 @@ -import datetime -import re - -from city_scrapers_core.constants import COMMISSION -from city_scrapers_core.items import Meeting -from city_scrapers_core.spiders import CityScrapersSpider - - -class ChiSsa16Spider(CityScrapersSpider): - name = "chi_ssa_16" - agency = "Chicago Special Service Area #16" - timezone = "America/Chicago" - start_urls = ["https://greektownchicago.org/about/ssa-16/"] - - def parse(self, response): - """ - Meeting entries are contained in a list item without any specific class or id - designation. Because of this, I filtered the present list items on the page with - the ", 20" string (every meeting li has this in the present text from the year - listed), which indicates the meeting occurred or is scheduled to occur and - therefore contains relevant information to document. - """ - for item in response.xpath('//li[contains(text(), ", 20")]'): - meeting = Meeting( - title=self._parse_title(item), - description=self._parse_description(item), - classification=self._parse_classification(item), - start=self._parse_start(item), - end=self._parse_end(item), - all_day=self._parse_all_day(item), - time_notes=self._parse_time_notes(item), - location=self._parse_location(item), - links=self._parse_links(item), - source=self._parse_source(response), - ) - meeting["status"] = self._get_status(meeting) - meeting["id"] = self._get_id(meeting) - - yield meeting - - def _parse_title(self, item): - # There was no variation in types of meetings, so this was applicable for all. - return "Tax Commission" - - def _parse_description(self, item): - return "" - - def _parse_classification(self, item): - return COMMISSION - - def _parse_start(self, item): - # Extracted all alphanumeric characters from the text of each meeting, - # which contained the dates of the meeting, then split into list containing M, - # D, Y - date = re.sub(r"[^a-zA-Z0-9]+", " ", item.xpath("text()").get()).split() - - # Extracted just alphabetical characters from month, then used built-in strptime - # function in datetime to parse numeric month from string - month = re.sub(r"[^a-zA-Z]+", " ", date[0]) - month = datetime.datetime.strptime(month, "%B").month - - # Extracted numbers from day and year entries of date list to remove any errant - # characters (i.e. one entry said January 28th where all others read January 28) - day = int(re.sub(r"[^0-9]+", " ", date[1])) - year = int(re.sub(r"[^0-9]+", " ", date[2])) - - # Extracts accompanying meeting information to extract meeting time - time = item.xpath( - 'ancestor::div[@class="gdc_row"]' - '/descendant::p[contains(text(), "60661")]/text()' - ).get() - time = re.sub(r"[^a-zA-Z0-9:]+", "", time) - time = re.findall(r"\d{1,2}:\d{2}(?:AM|PM|am|pm)", time)[0].upper() - - hour = datetime.datetime.strptime(time, "%I:%M%p").hour - minute = datetime.datetime.strptime(time, "%I:%M%p").minute - - return datetime.datetime(year, month, day, hour, minute) - - def _parse_end(self, item): - """ - Meeting adjournment information contained in files present in Minutes documents - attached to each meeting that are un-optimized scanned docs. - """ - return None - - def _parse_time_notes(self, item): - # No other details present - return "" - - def _parse_all_day(self, item): - return False - - def _parse_location(self, item): - # Meetings occurred at same location for all years documented - return { - "address": "306 S. Halsted St, 2nd Floor, Chicago, IL 60661", - "name": "SSA #16 Office", - } - - def _parse_links(self, item): - """ - Most entries contained a Minutes document, but some not yet posted or otherwise - have not occurred. When no anchor tag found, returns empty JSON element. - """ - if item.xpath("a/@href").get() is None: - return [] - - return [ - {"href": item.xpath("a/@href").get(), "title": item.xpath("a/text()").get()} - ] - - def _parse_source(self, response): - return response.url diff --git a/tests/files/chi_ssa_16.html b/tests/files/chi_ssa_16.html deleted file mode 100644 index e020a193b..000000000 --- a/tests/files/chi_ssa_16.html +++ /dev/null @@ -1,709 +0,0 @@ - - -
- - - - -Special Service Areas (SSA), known as Business Improvement Districts or BIDs in other cities, are local tax districts that fund expanded services and programs through a localized property tax levy within contiguous areas. The enhanced services and programs are in addition to those currently provided through the City.
-SSA-funded projects typically include but are not limited to: public way maintenance and beautification; district marketing and advertising; business retention/attraction, special events and promotional activities; auto and bike transit; security; façade improvements; and other commercial and economic development initiatives.
-The City contracts with local non-profits, called Service Providers, to manage SSAs. Mayorally-appointed SSA Commissioners for each SSA district oversee and recommend the annual services, budget and Service Provider Agency to the City. There are currently more than 50 active SSAs in Chicago and 800 Nationwide.
-Under the Illinois Open Meetings Act, 5 ILCS 120/2.02, 2.03, the Greektown Special Service Area Tax Commission #16 is hereby giving notice of its public meeting calendar for 2020 to be held at the SSA #16 office at 306 S. Halsted St, 2nd Floor, Chicago, IL 60661 at 2:00 p.m.
-2016 Greektown Sole Provider Agreement SSA 16
-2017 Greektown Sole Provider Agreement SSA 16
- - -Under the Illinois Open Meetings Act, 5 ILCS 120/2.02, 2.03, the Greektown Special Service Area Tax Commission #16 is hereby giving notice of its public meeting calendar for 2019 to be held at the SSA #16 office at 306 S. Halsted St, 2nd Floor, Chicago, IL 60661 at 2:00 p.m.
-Under the Illinois Open Meetings Act, 5 ILCS 120/2.02, 2.03, the Greektown Special Service Area Tax Commission #16 is hereby giving notice of its public meeting calendar for 2018 to be held at the SSA #16 office at 306 S. Halsted St, 2nd Floor, Chicago, ILL 60661 at 2:00 p.m.
-Under the Illinois Open Meetings Act, 5 ILCS 120/2.02, 2.03, the Greektown Special Service Area Tax Commission #16 is hereby given notice of its public meetings for 2017 to be held at the SSA #16 office located at 306 S. Halsted Street, 2nd Floor Chicago,IL 60661 at 2:00PM.
-Under the Illinois Open Meetings Act, 5 ILCS 120/2.02, 2.03, the Greektown Special Service Area Tax Commission #16 is hereby given notice of its public meetings for 2016 to be held at the SSA #16 office located at 306 S. Halsted Street, 2nd Floor Chicago,IL 60661 at 3:00PM.
-Greektown SSA #16 and the West Central Association – Chamber of Commerce is committed to improving neighborhood safety and quality-of-life. In 2018, we are now offering rebate programs for safety/security and facade enhancements within the SSA district.
-Security Rebate Pilot Program
-Greektown SSA will reimburse up to $1,500 for the first-time installation of eligible cost and up to $500 for an updated project.
Download the 2019 Security Rebate Pilot Program Document
-Facade Rebate Pilot Program
-Greektown SSA will reimburse eligible Facade improvements up to 50% of financial rebate for eligible exterior improvements worth at least $500 with a maximum rebate amount not to exceed a total of $3,500.
Download the 2019 Facade Rebate Pilot Program Document
-Greektown SSA will reimburse eligible awning and signage improvements, up to a 50% rebate for awnings, hanging and projecting signage, and 35% rebate for other signage. Rebates for all signage shall not exceed $2,000.
- -