Skip to content

Commit f2a1afa

Browse files
authored
Merge branch 'main' into 1373-update-nc
2 parents adbd7e9 + c92c624 commit f2a1afa

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Releases are also tagged in git, if that's helpful.
1515
- Fix `me` Update maine scraper and add backscraper
1616
- Update `sd` backscraper and extract from text
1717
- update `nc` scraper to OpinionSiteLinear and new website #1373
18+
- Fix `bia` scraper
1819

1920
## Current
2021

juriscraper/opinions/united_states/administrative_agency/bia.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
History:
88
2021-12-18: Created by William E. Palin
99
2024-05-07: Updated by grossir
10+
2025-04-25: Updated by quevon24
1011
"""
1112

1213
import re
@@ -69,14 +70,14 @@ def extract_from_text(self, scraped_text: str) -> Dict[str, Any]:
6970
:return: Metadata to be added to the case
7071
"""
7172
date = re.findall(
72-
r"Decided (by (Acting\s)?Attorney General )?(.*\d{4})",
73+
r"Decided (?:(?:by (?:Acting\s)?Attorney General|as amended)\s)?(.*\d{4})",
7374
scraped_text,
7475
)
7576
if not date:
7677
logger.error("bia: unable to extract_from_text a date_filed")
7778
return {}
7879

79-
date_filed = datetime.strptime(date[0][-1], "%B %d, %Y").strftime(
80+
date_filed = datetime.strptime(date[0], "%B %d, %Y").strftime(
8081
"%Y-%m-%d"
8182
)
8283
metadata = {

0 commit comments

Comments
 (0)