Update Parser.py
Browse files
Parser.py
CHANGED
|
@@ -172,7 +172,7 @@ class Case:
|
|
| 172 |
pattern = re.compile('Decided\s*\w*\s*[0-9]{1,2}[\.,]\s?[0-9]{4}')
|
| 173 |
match = re.search(pattern, s.text)
|
| 174 |
date_extract = s.text[match.span()[0]:match.span()[1]].split('Decided')[-1].strip()
|
| 175 |
-
date =
|
| 176 |
self.date = date
|
| 177 |
return
|
| 178 |
|
|
@@ -191,11 +191,7 @@ class Case:
|
|
| 191 |
def update_majority_joining(self):
|
| 192 |
print("Getting updated list")
|
| 193 |
cy = court_from_year(self.date)
|
| 194 |
-
known = [j for d in self.dissents for j in d.joining] + [d.author for d in self.dissents] + [j for c in
|
| 195 |
-
self.concurrences
|
| 196 |
-
for j in
|
| 197 |
-
c.joining] + [
|
| 198 |
-
c.author for c in self.concurrences] + [self.majority.author] + [r for r in self.recused]
|
| 199 |
all_justices = [aj for aj in cy['Associate']]
|
| 200 |
if cy['Chief'] is not None:
|
| 201 |
all_justices.append('Chief')
|
|
|
|
| 172 |
pattern = re.compile('Decided\s*\w*\s*[0-9]{1,2}[\.,]\s?[0-9]{4}')
|
| 173 |
match = re.search(pattern, s.text)
|
| 174 |
date_extract = s.text[match.span()[0]:match.span()[1]].split('Decided')[-1].strip()
|
| 175 |
+
date = dateparser.parse(date_extract)
|
| 176 |
self.date = date
|
| 177 |
return
|
| 178 |
|
|
|
|
| 191 |
def update_majority_joining(self):
|
| 192 |
print("Getting updated list")
|
| 193 |
cy = court_from_year(self.date)
|
| 194 |
+
known = [j for d in self.dissents for j in d.joining] + [d.author for d in self.dissents] + [j for c in self.concurrences for j in c.joining] + [c.author for c in self.concurrences] + [self.majority.author] + [r for r in self.recused]
|
|
|
|
|
|
|
|
|
|
|
|
|
| 195 |
all_justices = [aj for aj in cy['Associate']]
|
| 196 |
if cy['Chief'] is not None:
|
| 197 |
all_justices.append('Chief')
|