Skip to content

Commit

Permalink
Merge pull request #81 from haileyhoyat/cuya_audit
Browse files Browse the repository at this point in the history
Fix spider: cuya_audit
  • Loading branch information
haileyhoyat authored Jan 29, 2024
2 parents c48a17a + 1fd2f4b commit c2cb3fa
Show file tree
Hide file tree
Showing 4 changed files with 1,083 additions and 584 deletions.
24 changes: 5 additions & 19 deletions city_scrapers/spiders/cuya_audit.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,13 @@
import re

from city_scrapers_core.constants import ADVISORY_COMMITTEE
from city_scrapers_core.spiders import CityScrapersSpider

from city_scrapers.mixins import CuyaCountyMixin
from city_scrapers.mixins import CuyaCountyMixin2


class CuyaAuditSpider(CuyaCountyMixin, CityScrapersSpider):
class CuyaAuditSpider(CuyaCountyMixin2, CityScrapersSpider):
name = "cuya_audit"
agency = "Cuyahoga County Audit Committee"
start_urls = ["http://bc.cuyahogacounty.us/en-US/Audit-Committee.aspx"]
start_urls = [
"https://cuyahogacounty.gov/boards-and-commissions/board-details/external/audit-committee" # noqa
]
classification = ADVISORY_COMMITTEE
location = {
"name": "County Headquarters, 4-407 Conference Room B",
"address": "2079 East 9th St Cleveland, OH 44115",
}

def _parse_location(self, response):
detail_strs = response.css("blockquote dd::text").extract()
loc_str = None
for detail_str in detail_strs:
if re.search(r"\d{3}", detail_str):
loc_str = re.sub(r"\s+", " ", detail_str).strip()
if not loc_str or "2079" in loc_str:
return self.location
return {"name": "", "address": loc_str}
Loading

0 comments on commit c2cb3fa

Please sign in to comment.