Skip to content

Commit

Permalink
Tighten docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
SimmonsRitchie committed Feb 6, 2024
1 parent bacc50e commit e981b54
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions city_scrapers/spiders/il_adcrc.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class IlAdcrcSpider(CityScrapersSpider):

def parse(self, response):
"""
Retrieve the upcoming meetings URL from the main page, which is a JSON feed,
and then parse the JSON to get the meeting details.
Retrieve the URL to the upcoming meetings JSON feed from the main
page and then follow that URL to parse the feed.
"""
upcoming_meetings_url = response.css(
".cmp-news-feed::attr(data-news-feed-url)"
Expand Down Expand Up @@ -92,12 +92,14 @@ def _parse_links(self, item):
]

def _parse_source(self, response):
"""Parse or generate source."""
"""Generate source."""
return response.url

def _get_status(self, meeting, item):
"""Checks the cancelation status first and then passes a "canceled" string
to the parent's _get_status method so we can rely on default status handling."""
"""Checks the canceledEvent property first and then passes a
"canceled" string to the parent class's _get_status method so
we can rely on default status handling.
"""
if item.get("canceledEvent") and item["canceledEvent"] == "true":
return super()._get_status(meeting, text="canceled")
return super()._get_status(meeting)

0 comments on commit e981b54

Please sign in to comment.