Skip to content

Commit

Permalink
fix(OLC): Fix OLC
Browse files Browse the repository at this point in the history
  • Loading branch information
flooie committed Nov 14, 2023
1 parent 8077401 commit ddcd08d
Show file tree
Hide file tree
Showing 3 changed files with 2,812 additions and 1,341 deletions.
16 changes: 7 additions & 9 deletions juriscraper/opinions/united_states/administrative_agency/olc.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@ def __init__(self, *args, **kwargs):
self.status = "Published"

def _process_html(self):
for row in self.html.xpath(
".//tr[contains(@class , 'even')] | .//tr[contains(@class , 'odd')]"
):
date = get_row_column_text(row, 1)
if "Date of Issuance" in date:
date = date.split("\n")[-1].strip()
name = get_row_column_text(row, 2)
url = get_row_column_links(row, 2)
summary = get_row_column_text(row, 3)
for row in self.html.xpath(".//article"):
name = row.xpath(".//h2")[0].text_content().strip()
url = row.xpath(".//a/@href")[0]
date = row.xpath(".//time")[0].text_content()
if not name:
continue
summary = row.xpath(".//p")[0].text_content()
self.cases.append(
{
"date": date,
Expand Down
Loading

0 comments on commit ddcd08d

Please sign in to comment.