Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/803-ca2-podcast-down' into 803-c…
Browse files Browse the repository at this point in the history
…a2-podcast-down
  • Loading branch information
quevon24 committed Dec 12, 2023
2 parents dc1fda0 + ed68452 commit 6816afb
Show file tree
Hide file tree
Showing 99 changed files with 132 additions and 121 deletions.
14 changes: 12 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,28 @@ Releases are also tagged in git, if that's helpful.

## Current

**2.5.70 - 2023-11-21**
**2.5.71 - 2023-12-11**

Features:

-

Changes:

- Fix LA Supreme
- Fix avoid populating case's date_filed with the entry date_filed from emails

## Past

**2.5.70 - 2023-11-21**

Features:

-

Changes:

- Fix LA Supreme

**2.5.69 - 2023-11-21**

Features:
Expand Down
23 changes: 12 additions & 11 deletions juriscraper/opinions/united_states/state/va.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,33 @@ def __init__(self, *args, **kwargs):
self.court_id = self.__module__
self.url = "http://www.courts.state.va.us/scndex.htm"
self.status = "Published"
today = date.today()

def _process_html(self):
if self.test_mode_enabled():
today = datetime.strptime("11/20/2023", "%m/%d/%Y").date()
self.two_months_ago = today - timedelta(days=60)
else:
today = date.today()

def _process_html(self):
for row in self.html.xpath("//p"):
links = row.xpath(".//a")
if len(links) != 2:
continue
name = row.xpath(".//b/text()")[0].strip()
summary = row.text_content().split(name)[1].strip()
date = summary.split("\n")[0].strip()
if "Revised" in date:
date = date.split("Revised")[1].strip().strip(")")

date_object = datetime.strptime(date, "%m/%d/%Y").date()
if date_object < self.two_months_ago:
continue
date_str = summary.split("\n")[0].strip()
if "Revised" in date_str:
date_str = date_str.split("Revised")[1].strip().strip(")")
date_object = datetime.strptime(date_str, "%m/%d/%Y").date()
if date_object < today - timedelta(days=60):
# Stop after two months
break

self.cases.append(
{
"name": row.xpath(".//b/text()")[0].strip(),
"docket": links[0].get("name"),
"url": links[1].get("href"),
"summary": summary,
"date": date,
"date": date_str,
}
)
4 changes: 2 additions & 2 deletions juriscraper/pacer/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ def _get_dockets(self) -> DocketType:
docket = {
"case_name": self._get_case_name_plain(),
"docket_number": docket_number,
"date_filed": self._get_date_filed(),
"date_filed": None,
"docket_entries": self._get_docket_entries(),
}
dockets.append(docket)
Expand All @@ -406,7 +406,7 @@ def _get_dockets(self) -> DocketType:
docket = {
"case_name": self._get_case_name(docket_table),
"docket_number": docket_number,
"date_filed": self._get_date_filed(),
"date_filed": None,
"docket_entries": self._get_docket_entries(docket_table),
}
dockets.append(docket)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from setuptools import find_packages, setup
from setuptools.command.install import install

VERSION = "2.5.70"
VERSION = "2.5.71"
AUTHOR = "Free Law Project"
EMAIL = "[email protected]"
HERE = os.path.abspath(os.path.dirname(__file__))
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nda/ca11_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "Marjorie Taylor Greene v. Secretary of State for the State of Georgia",
"date_filed": "2022-08-10",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2022-08-10",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nda/ca11_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "Marjorie Taylor Greene v. Secretary of State for the State of Georgia",
"date_filed": "2022-08-22",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2022-08-22",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nda/ca2_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "New York State Telecommunicati v. James",
"date_filed": "2022-07-27",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2022-07-27",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nda/ca2_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "New York State Telecommunicati v. James",
"date_filed": "2022-06-14",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2022-06-14",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nda/ca2_3.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "New York State Telecommunicati v. James",
"date_filed": "2022-03-23",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2022-03-23",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nda/ca2_4.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "New York State Telecommunicati v. James",
"date_filed": "2022-03-03",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2022-03-03",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nda/ca2_5.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "Elisa W. v. The City of New York",
"date_filed": "2022-08-10",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2022-08-10",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nda/ca3_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "Madison Lara v. Commissioner PA State Police",
"date_filed": "2022-08-08",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2022-08-08",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nda/ca3_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "Port Hamilton Refining and Transportation LLLP v. EPA",
"date_filed": "2023-01-27",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2023-01-27",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nda/ca4_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "Neuhtah Opiotennione v. Bozzuto Management Company",
"date_filed": "2022-08-19",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2022-08-19",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nda/ca4_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "Neuhtah Opiotennione v. Bozzuto Management Company",
"date_filed": "2022-08-18",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2022-08-18",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nda/ca5_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "Certain Underwriters v. Cox Operating",
"date_filed": "2022-08-16",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2022-08-16",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nda/ca5_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "Kenai Ironclad v. CP Marine Services",
"date_filed": "2022-09-26",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2022-09-26",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nda/ca6_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "Andrea Goldblum v. UC",
"date_filed": "2022-08-15",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2022-08-15",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nda/ca6_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "Anthony Eid v. Wayne State University",
"date_filed": "2022-08-17",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2022-08-17",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nda/ca9_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "Rosemarie Vargas v. Facebook, Inc.",
"date_filed": "2022-08-08",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2022-08-08",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nda/ca9_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "Mackenzie Brown v. State of Arizona",
"date_filed": "2022-08-08",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2022-08-08",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nda/ca9_3.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "Rosemarie Vargas v. Facebook, Inc.",
"date_filed": "2022-08-08",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2022-08-08",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nda/ca9_4.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "Mackenzie Brown v. State of Arizona",
"date_filed": "2022-08-08",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2022-08-08",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nda/ca9_5.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "City of Oakland v. BP PLC",
"date_filed": "2022-12-05",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2022-12-05",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nda/cafc_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "Corephotonics, Ltd. v. Apple Inc.",
"date_filed": "2022-08-22",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2022-08-22",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nda/cafc_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "Corephotonics, Ltd. v. Apple Inc.",
"date_filed": "2022-08-19",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2022-08-19",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nef/ared_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "Bryson v. Protho Junction LLC",
"date_filed": "2021-06-10",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2021-06-10",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nef/ared_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "Santiago v. United Parcel Service Inc",
"date_filed": "2021-06-10",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2021-06-10",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nef/ared_3.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "Pitts v. Fire Extinguisher Sales & Services of Arkansas LLC",
"date_filed": "2021-06-10",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2021-06-10",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nef/arwd.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "Kizziar v. Zakirali",
"date_filed": "2021-06-10",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2021-06-10",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nef/cacd.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "Kelvin Hernandez Roman v. Chad F. Wolf",
"date_filed": "2021-04-19",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2021-04-19",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nef/cand.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "Epic Games, Inc. v. Apple Inc.",
"date_filed": "2021-04-19",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2021-04-19",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nef/ned.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "Hicks v. Hawkins Construction Company",
"date_filed": "2021-06-10",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2021-06-10",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nef/s3/almd_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "Stapler v. Automatic Food Service, Inc.",
"date_filed": "2021-08-09",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2021-08-09",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nef/s3/almd_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "Stapler v. Automatic Food Service, Inc.",
"date_filed": "2021-08-09",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2021-08-09",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nef/s3/almd_3_plain.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "United States v. MANAFORT",
"date_filed": "2019-03-15",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2019-03-15",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/pacer/nef/s3/almd_4_plain.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockets": [
{
"case_name": "United States v. MANAFORT",
"date_filed": "2019-03-15",
"date_filed": null,
"docket_entries": [
{
"date_filed": "2019-03-15",
Expand Down
Loading

0 comments on commit 6816afb

Please sign in to comment.