-
-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #778 from freelawproject/update-conn-appeals
feat(connappct): Fix Conn App Ct
- Loading branch information
Showing
4 changed files
with
2,318 additions
and
447 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,15 +4,41 @@ | |
Author: Asadullah Baig<[email protected]> | ||
Date created: 2014-07-11 | ||
History: | ||
- 2022-02-02, satsuki-chan: Fixed docket and name separator, changed super class to OpinionSiteLinear | ||
- 2022-02-02, satsuki-chan: Updated to Opinionsitelinear | ||
- 2023-11-20, William Palin: Updated | ||
""" | ||
|
||
from juriscraper.opinions.united_states.state import conn | ||
from datetime import date | ||
|
||
from juriscraper.OpinionSiteLinear import OpinionSiteLinear | ||
|
||
class Site(conn.Site): | ||
|
||
class Site(OpinionSiteLinear): | ||
def __init__(self, *args, **kwargs): | ||
super().__init__(*args, **kwargs) | ||
self.court_id = self.__module__ | ||
self.year = date.today().strftime("%y") | ||
self.url = f"http://www.jud.ct.gov/external/supapp/archiveAROap{self.year}.htm" | ||
self.docket_regex = r"AC\d+" | ||
self.status = "Published" | ||
|
||
def _process_html(self) -> None: | ||
"""Process the html and extract out the opinions | ||
:return: None | ||
""" | ||
for date_section in self.html.xpath("//ul"): | ||
b = date_section[0].xpath(".//preceding::b[1]")[0] | ||
date = b.text_content().strip().split()[-1][:-1] | ||
for li in date_section.xpath(".//li"): | ||
link = li.xpath(".//a")[0] | ||
link_text = link.text_content() | ||
docket = link.text_content() | ||
name = li.text_content().replace(link_text, "").strip() | ||
self.cases.append( | ||
{ | ||
"date": date, | ||
"url": link.get("href"), | ||
"docket": docket, | ||
"name": name, | ||
} | ||
) |
Oops, something went wrong.