Skip to content

Commit adff683

Browse files
authored
Merge branch 'main' into 1266-improve-ind-scraper
2 parents 5f9fbeb + 3da575b commit adff683

4 files changed

Lines changed: 305 additions & 3471 deletions

File tree

‎CHANGES.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Fixes:
2727
- Fix `ariz` update download URLs #1474
2828
- improve `ind` add new fields for lower court details and judge names
2929
- handle empty cases in `ca7` scraper #1484
30+
- fix `idaho_civil` preformat date to prevent parsing errors #1284
3031

3132
## Current
3233

‎juriscraper/opinions/united_states/state/idaho_civil.py‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- 2015-10-23, mlr: Updated to handle annoying situation.
1010
- 2016-02-25 arderyp: Updated to catch "ORDER" (in addition to "Order") in download url text
1111
- 2024-12-30, grossir: updated to OpinionSiteLinear
12+
- 2025-07-09, luism: Updated to prevent wrongly formatted dates
1213
"""
1314

1415
from juriscraper.OpinionSiteLinear import OpinionSiteLinear
@@ -42,9 +43,15 @@ def _process_html(self):
4243
row_xpath = f"//table//tr[.//{self.path_conditional_anchor}]"
4344
for row in self.html.xpath(row_xpath):
4445
url = self.get_opinion_url(row).replace("http://", "https://")
46+
47+
# Sanitize case date, fix typo in date format
48+
date = row.xpath("string(td[1])").strip()
49+
if date == "Aug 22,2018":
50+
date = "Aug 22, 2018"
51+
4552
self.cases.append(
4653
{
47-
"date": row.xpath("string(td[1])").strip(),
54+
"date": date,
4855
"docket": row.xpath("string(td[2])").strip(),
4956
"name": row.xpath("string(td[3])").strip(),
5057
"url": url,

0 commit comments

Comments
 (0)