Skip to content

Commit

Permalink
fix(neb): handle row with no link
Browse files Browse the repository at this point in the history
Solves #1207
  • Loading branch information
grossir committed Oct 11, 2024
1 parent 1ee3bc7 commit ef9142a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion juriscraper/opinions/united_states/state/neb.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit ef9142a

Please sign in to comment.