Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oklahoma's search_by_date method is broken for counties without a dedicated latest filings page #178

Open
palewire opened this issue Dec 13, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@palewire
Copy link
Contributor

palewire commented Dec 13, 2022

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.

@palewire palewire added the bug Something isn't working label Dec 13, 2022
@palewire
Copy link
Contributor Author

I now see this is a duplicate of #154

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant