Oklahoma's `search_by_date` method is broken for counties without a dedicated latest filings page
Opened this issue · 1 comments
palewire commented
When an Oklahoma county lacks a dedicated daily filings page, the scraper attempts to use the global search.
if self.place_id in DAILY_FILING_COUNTIES:
search_obj = DailyFilings(self.place_id)
else:
search_obj = Search(self.place_id)
That doesn't work, as shown in the test_site.test_by_date_kiowa
test, which will fail. The traceback looks something like:
# Search results contain an entry for every party
# to a case, so we need to deduplicate
results = {}
# Only grab result rows (i.e. skip header)
> for row in self.soup.table.find_all("tr", class_="resultTableRow"):
E AttributeError: 'NoneType' object has no attribute 'find_all'
The bug can be recreated manually with the following snippet:
from court_scraper import Site
kiowa = Site("ok_kiowa")
kiowa.search_by_date()
The test that demonstrates the bug is currently commented out. If this bug is squashed, it can be restored.