Skip to content

Commit

Permalink
fix(acca): Fix ACCA
Browse files Browse the repository at this point in the history
  • Loading branch information
flooie committed Nov 14, 2023
1 parent c23d020 commit 348c6e8
Show file tree
Hide file tree
Showing 11 changed files with 2,954 additions and 28,073 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
class Site(acca_p.Site):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.url = "https://www.jagcnet.army.mil/85257546006DF36B/MODD?OpenView&Count=-1"
self.url = "https://www.jagcnet.army.mil/ACCALibrary/cases/opinions/MO"
self.court_id = self.__module__

def _get_precedential_statuses(self):
return ["Unpublished"] * len(self.case_names)
self.status = "Unpublished"
28 changes: 14 additions & 14 deletions juriscraper/opinions/united_states/federal_special/acca_p.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@ class Site(OpinionSiteLinear):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.court_id = self.__module__
self.url = "https://www.jagcnet.army.mil/85257546006DF36B/ODD?OpenView&Count=-1"
self.url = "https://www.jagcnet.army.mil/ACCALibrary/cases/opinions/OC"
self.status = "Published"

def _process_html(self):
for row in self.html.xpath('//tr[@class="domino-viewentry"]'):
cell_three = row.xpath(".//td[3]")[0]
text = cell_three.text_content()
text_parts = text.split("-", 1)
hrefs = cell_three.xpath(".//a/@href")

# skip rows without link to opinion
if not hrefs:
for row in self.html.xpath(
'//*[@id="Opinions_ResizeContainer"]/table/tbody/tr'
):
col1, col2, col3 = row.xpath(".//td")
url = col1.xpath(".//a/@href")
if not url:
continue

name = col1.text_content()
docket = col2.text_content()
date = col3.text_content()
self.cases.append(
{
"date": row.xpath(".//td[1]")[0].text_content(),
"docket": text_parts[0],
"name": text_parts[1],
"url": hrefs[0],
"date": date.strip(),
"docket": docket.strip(),
"name": name.strip(),
"url": url[0],
}
)
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
class Site(acca_p.Site):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.url = "https://www.jagcnet.army.mil/85257546006DF36B/SDD?OpenView&Count=-1"
self.url = "https://www.jagcnet.army.mil/ACCALibrary/cases/opinions/SD"
self.court_id = self.__module__

def _get_precedential_statuses(self):
return ["Unpublished"] * len(self.case_names)
self.status = "Unpublished"
Loading

0 comments on commit 348c6e8

Please sign in to comment.