diff --git a/city_scrapers/spiders/il_aging_advisory_council.py b/city_scrapers/spiders/il_aging_advisory_council.py deleted file mode 100644 index e2d5051f7..000000000 --- a/city_scrapers/spiders/il_aging_advisory_council.py +++ /dev/null @@ -1,119 +0,0 @@ -from datetime import datetime - -from city_scrapers_core.constants import ADVISORY_COMMITTEE -from city_scrapers_core.items import Meeting -from city_scrapers_core.spiders import CityScrapersSpider - - -# TODO: Fix -class IlAgingAdvisoryCouncilSpider(CityScrapersSpider): - name = "il_aging_advisory_council" - agency = "Illinois Aging Advisory Council" - timezone = "America/Chicago" - start_urls = [ - "https://www2.illinois.gov/aging/PartnersProviders/OlderAdult/Pages/acmeetings.aspx" # noqa - ] - location = { - "address": "160 N. LaSalle Street, 7th Floor, Chicago", - "name": "Michael A. Bilandic Building", - } - - def parse(self, response): - """ - `parse` should always `yield` Meeting items. - - Change the `_parse_title`, `_parse_start`, etc methods to fit your scraping - needs. - """ - self._validate_location(response) - - self._validate_meeting_times(response) - - table = response.xpath( - '//*[@id="ctl00_PlaceHolderMain_ctl01__ControlWrapper_RichHtmlField"]\ - /table' - ) - - for table_row in table.xpath(".//tr"): - row_date = table_row.xpath( - ".//strong/\ - text()" - ).re(r"([A-Z]\w+)\s*(\d\d?),*\s*(\d\d\d\d)") - if not row_date: - continue - converted_date = self._convert_date(row_date) - - row_urls = table_row.xpath(".//a") - - meeting = Meeting( - title="Advisory Committee", - description="", - classification=ADVISORY_COMMITTEE, - start=self._parse_start(converted_date), - end=self._parse_end(converted_date), - all_day=self._parse_all_day(table_row), - time_notes="", - location=self.location, - links=self._parse_links(row_urls), - source=self._parse_source(response), - ) - - meeting["status"] = self._get_status(meeting) - meeting["id"] = self._get_id(meeting) - - yield meeting - - def _validate_location(self, response): - location_test = response.xpath( - '//*[@id="ctl00_PlaceHolderMain_ctl01__ControlWrapper_RichHtmlField"]\ - /ul/li[2]/text()' - ).get() - if "7th Floor, 160 N. LaSalle Street" not in location_test: - raise ValueError("Meeting location has changed") - - def _validate_meeting_times(self, response): - meeting_time = response.xpath( - '//*[@id="ctl00_PlaceHolderMain_ctl01__ControlWrapper_RichHtmlField"]\ - /p[1]/text()' - ).get() - if "1 p.m. - 3 p.m" not in meeting_time: - raise ValueError("Meeting times have changed") - - def _convert_date(self, item): - """Parse start datetime as a naive datetime object.""" - month = item[0] - day = item[1] - year = item[2] - converted_date = datetime.strptime(month[0:3] + day + year, "%b%d%Y") - return converted_date - - def _parse_start(self, item): - """Parse start datetime as a naive datetime object.""" - return item.replace(hour=13) - - def _parse_end(self, item): - """Parse end datetime as a naive datetime object. Added by pipeline if None""" - return item.replace(hour=15) - - def _parse_links(self, item): - """Parse or generate links.""" - links = [] - for i in item: - href = i.xpath("@href").get() - if not href: - continue - full_href = "https://www2.illinois.gov" + href - text = i.xpath("text()").get() - if not text: - continue - stripped_text = text.replace("\u200b", "").replace("\xa0", "") - links.append({"href": full_href, "title": stripped_text}) - return links - - def _parse_all_day(self, item): - """Parse or generate all-day status. Defaults to False.""" - return False - - def _parse_source(self, response): - """Parse or generate source.""" - return response.url diff --git a/tests/files/il_aging_advisory_council.html b/tests/files/il_aging_advisory_council.html deleted file mode 100644 index 474e3af96..000000000 --- a/tests/files/il_aging_advisory_council.html +++ /dev/null @@ -1,728 +0,0 @@ - - - - - - - - Advisory Committee Meetings - - Older Adult Services Act - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
- - - -
- - -
-
- - - -
- - -
- -
-
-
-
-
-
-
- - - -
-
-
-

Utility Links

-

Translate

-
 
-
- - - -
-
-
-
-
-
- - - -
-
-
-
- - - - - - -
-
-

- Advisory Committee Meetings -

-
-
- - -
- -
- - -
-
-
- - - -
-
-
- -
-
-
-

Committee meetings are held from 1 p.m. - 3 p.m. by video conference. Locations are:

-
  • Springfield – Illinois Department on Aging, One Natural Resources Way, #100, and
  • -
  • Chicago – Michael A. Bilandic Building, 7th Floor, 160 N. LaSalle Street
-

Meetings are open to the public. To attend a meeting or for more information, contact Sophia Gonzalez.

-

PDF IconOlder Adult Services Overview

-

Meeting Schedule:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MeetingAgendas (PDF)Minutes (PDF)
2019 Meetings
February 25, 2019

​Minutes
Nutrition Innovations Presentation
HCA Survey Findings Presentation

May 20, 2019Minutes
August 19, 2019Minutes
Alzheimer's Presentation
November 18, 2019
2018 Meetings
Feb 26, 2018 

​ Minutes

May 21, 2018
Joint Meeting with Illinois Council on Aging (ICoA)
 Agenda

 Minutes

OASAC Presentation

Aug 20, 2018 

 Minutes
OASAC Presentation

Nov 19, 2018 Minutes
OASAC CC Survey
OASAC IDVA Presentation
OASAC Presentation of Falls Data
2017 Meetings​
​Feb 3, 2017 (See Agenda for call-in information)Feb 24, 2014 Minutes.pdfAgenda
​Feb 27, 2017Minutes
​May 3, 2017 (See Agenda for call-in information)Feb 24, 2014 Minutes.pdfAgenda
May 22, 2017Minutes
​Aug 21, 2017Feb 24, 2014 Minutes.pdfAgendaMinutes
​Nov 13, 2017Minutes
2016 Meetings
​​Feb 8, 2016 (See Agenda for call-in information)Feb 24, 2014 Minutes.pdfAgenda
Feb 22, 2016 (Note times and locations above)Minutes
May 16, 2016 (Note times and locations above)Minutes
June 1, 2016 (See Agenda for call-in information)​​AgendaMinutes
​Aug 11, 2016 (See Agenda for call-in information)AgendaMinutes
Aug 22, 2016 (Note times and locations above)Minutes
Aug 25, 2016 (See Agenda for call-in information)​Agenda
Nov 14, 2016 (Note times and locations above)Minutes
-

Return to OASA Advisory Committee page​​

-

Archived Advisory Committee Meetings

-
- - -
-
- -
-
- -
-
- -
-
- - -
-
-
- -
-
-
- - -
- - - - -
-
-
- -
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/tests/test_il_aging_advisory_council.py b/tests/test_il_aging_advisory_council.py deleted file mode 100644 index 18df8aaf4..000000000 --- a/tests/test_il_aging_advisory_council.py +++ /dev/null @@ -1,81 +0,0 @@ -from datetime import datetime -from os.path import dirname, join - -import pytest # noqa -from city_scrapers_core.constants import ADVISORY_COMMITTEE -from city_scrapers_core.utils import file_response -from freezegun import freeze_time - -from city_scrapers.spiders.il_aging_advisory_council import IlAgingAdvisoryCouncilSpider - -test_response = file_response( - join(dirname(__file__), "files", "il_aging_advisory_council.html"), - url="https://www2.illinois.gov/aging/PartnersProviders/OlderAdult/Pages/acmeetings.aspx", # noqa -) -spider = IlAgingAdvisoryCouncilSpider() - -freezer = freeze_time("2019-12-23") -freezer.start() - -parsed_items = [item for item in spider.parse(test_response)] - -freezer.stop() - - -def test_title(): - assert parsed_items[0]["title"] == "Advisory Committee" - - -def test_description(): - assert parsed_items[0]["description"] == "" - - -def test_classification(): - assert parsed_items[0]["classification"] == ADVISORY_COMMITTEE - - -def test_start(): - assert parsed_items[0]["start"] == datetime(2019, 2, 25, 13, 0) - - -def test_end(): - assert parsed_items[0]["end"] == datetime(2019, 2, 25, 15, 0) - - -def test_all_day(): - assert parsed_items[0]["all_day"] is False - - -def test_time_notes(): - assert parsed_items[0]["time_notes"] == "" - - -def test_location(): - assert parsed_items[0]["location"] == { - "address": "160 N. LaSalle Street, 7th Floor, Chicago", - "name": "Michael A. Bilandic Building", - } - - -def test_links(): - assert parsed_items[0]["links"] == [ - { - "href": "https://www2.illinois.gov/aging/PartnersProviders/OlderAdult/Documents/Full_OASAC_Minutes_2.25.2019.pdf", # noqa - "title": "Minutes", - }, - { - "href": "https://www2.illinois.gov/aging/PartnersProviders/Documents/NutritionInnovations_Grant%20Presentation_OASAC.pdf", # noqa - "title": "Nutrition Innovations Presentation", - }, - { - "href": "https://www2.illinois.gov/aging/PartnersProviders/Documents/HCA_WorkforceSurveyResultsSummary_OASAC.pdf", # noqa - "title": "HCA Survey Findings Presentation", - }, - ] - - -def test_source(): - assert ( - parsed_items[0]["source"] - == "https://www2.illinois.gov/aging/PartnersProviders/OlderAdult/Pages/acmeetings.aspx" # noqa - )