From ef9142acb74b8249b68daedf4bab862971b061ea Mon Sep 17 00:00:00 2001 From: Gianfranco Rossi Date: Fri, 11 Oct 2024 17:56:43 -0500 Subject: [PATCH] fix(neb): handle row with no link Solves #1207 --- juriscraper/opinions/united_states/state/neb.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/juriscraper/opinions/united_states/state/neb.py b/juriscraper/opinions/united_states/state/neb.py index 3d59c6a3f..0e242c03a 100644 --- a/juriscraper/opinions/united_states/state/neb.py +++ b/juriscraper/opinions/united_states/state/neb.py @@ -1,3 +1,4 @@ +from juriscraper.AbstractSite import logger from juriscraper.lib.html_utils import fix_links_in_lxml_tree from juriscraper.OpinionSiteLinear import OpinionSiteLinear @@ -50,8 +51,10 @@ def _process_html(self): for row in table.xpath(".//tr[td]"): c1, c2, c3 = row.xpath(".//td") docket = c1.xpath(".//text()")[0].strip() - if "A-XX-XXXX" in docket: + if "A-XX-XXXX" in docket or not c3.xpath(".//a"): + logger.info("Skip row %s", row.text_content()) continue + citation = c2.xpath(".//text()")[0].strip() name = c3.xpath(".//a/text()")[0].strip() url = c3.xpath(".//a")[0].get("href")