Skip to content

Commit e1fdcd0

Browse files
committed
fix(bia): update bia scraper
add test cases update CHANGES.md
1 parent f9cead2 commit e1fdcd0

3 files changed

Lines changed: 20 additions & 1 deletion

File tree

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ words, they're the ones you'll want to watch, and the others are mostly noise.
1111
Releases are also tagged in git, if that's helpful.
1212

1313
## Coming up
14+
- Fix `bia` scraper and add extract from text test cases
1415

1516
## Current
1617

juriscraper/opinions/united_states/administrative_agency/bia.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def extract_from_text(self, scraped_text: str) -> Dict[str, Any]:
7070
:return: Metadata to be added to the case
7171
"""
7272
date = re.findall(
73-
r"Decided (?:(?:by (?:Acting\s)?Attorney General|as amended)\s)?(.*\d{4})",
73+
r"Decided (?:(?:by (?:(?:Acting\s)?Attorney General|Board)|as amended)\s)?(.*\d{4})",
7474
scraped_text,
7575
)
7676
if not date:

tests/local/test_ScraperExtractFromTextTest.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,24 @@ class ScraperExtractFromText(unittest.TestCase):
3131
}
3232
},
3333
),
34+
(
35+
"Matter of O-A-R-G-, et al., Respondents\nDecided as amended April 16, 2025 1\n",
36+
{
37+
"OpinionCluster": {
38+
"date_filed": "2025-04-16",
39+
"date_filed_is_approximate": False,
40+
}
41+
},
42+
),
43+
(
44+
"Matter of Leobardo DE JESUS-PLATON, Respondent\nDecided by Board January 17, 2025 1\n",
45+
{
46+
"OpinionCluster": {
47+
"date_filed": "2025-01-17",
48+
"date_filed_is_approximate": False,
49+
}
50+
},
51+
),
3452
],
3553
"juriscraper.opinions.united_states.state.nm": [
3654
(

0 commit comments

Comments
 (0)