Skip to content

Commit

Permalink
improve docstring and simplify parsing of source
Browse files Browse the repository at this point in the history
  • Loading branch information
Cruz Núñez authored and Cruz Núñez committed Sep 19, 2024
1 parent 9118d92 commit a4b5ecf
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions city_scrapers/spiders/losca_Board_of_Supervisors.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@ class LoscaBoardOfSupervisorsSpider(CityScrapersSpider):
start_urls = ["https://bos.lacounty.gov/board-meeting-agendas/"]

def parse(self, response):
"""
`parse` should always `yield` Meeting items.
Change the `_parse_title`, `_parse_start`, etc methods to fit your scraping
needs.
"""
"""Parse meeting items from agency website."""
location = {
"name": "Kenneth Hahn Hall of Administration",
"address": "500 West Temple Street, Room 381B, Los Angeles",
Expand All @@ -36,7 +31,7 @@ def parse(self, response):
time_notes="",
location=location,
links=self._parse_links(item),
source=self._parse_source(response),
source=response.url,
)

meeting["status"] = self._get_status(meeting)
Expand Down Expand Up @@ -74,7 +69,3 @@ def _parse_links(self, item):
href = link.css("::attr(href)").get()
out.append({"title": title, "href": href})
return out

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

0 comments on commit a4b5ecf

Please sign in to comment.