Skip to content

Commit 0718e9c

Browse files
authored
IL, ID Misc fixes (#5730)
* ID: catch line item vetos and session laws * IL: Bills: change in action table selector
1 parent 873b9ee commit 0718e9c

4 files changed

Lines changed: 8 additions & 5 deletions

File tree

scrapers/de/actions.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import re
22
from utils.actions import Rule, BaseCategorizer
33

4-
54
rules = (
65
Rule([r"Amendment (?P<bills>.+?) -\s+Laid On Table"], ["amendment-deferral"]),
76
Rule(["Favorable"], ["committee-passage-favorable"]),
@@ -19,9 +18,7 @@
1918
Rule(["unfavorable"], ["committee-passage-unfavorable"]),
2019
Rule([r"Reported Out of Committee \((?P<committees>.+?)\)"], ["committee-passage"]),
2120
Rule(["Vetoed by Governor"], ["executive-veto"]),
22-
Rule(
23-
[r"Amendment (?P<bills>.+?)\s+-\s+Introduced"], ["amendment-introduction"]
24-
),
21+
Rule([r"Amendment (?P<bills>.+?)\s+-\s+Introduced"], ["amendment-introduction"]),
2522
Rule([r"Amendment (?P<bills>[\w\s]+?) Passed"], ["amendment-passage"]),
2623
Rule(
2724
[r"Amendment (?P<bills>.+?) - Defeated by House of .+?\. Votes: Defeated"],

scrapers/id/actions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656
Rule(r"[Ee]nrolling", "enrolled"),
5757
Rule(r"Read third time in full – PASSED", "passage"),
5858
Rule(r"Read third time in full – FAILED", "failure"),
59+
Rule(r"Session Law Chapter", "became-law"),
60+
Rule(r"Line item vetoed", "executive-veto-line-item"),
5961
)
6062

6163

scrapers/id/bills.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ def scrape(self, chamber=None, session=None):
106106
self.warning("Unable to load subjects.")
107107
self._subjects = defaultdict(list)
108108

109+
# if you need to scrape a single bill
110+
# yield from self.scrape_bill("lower", "2026", "H 0978")
111+
# return
112+
109113
chambers = [chamber] if chamber else ["upper", "lower"]
110114
for chamber in chambers:
111115
yield from self.scrape_bill_url(chamber, session)

scrapers/il/bills.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ def scrape_bill(self, chamber, session, doc_type, url, bill_type=None):
555555
)
556556
# don't add just yet; we can make them better using action data
557557
# actions
558-
action_tds = doc.xpath('//h5[text()="Actions"]/../table//td')
558+
action_tds = doc.xpath('//h2[text()="Actions"]/../table//td')
559559
for date, actor, action_elem in group(action_tds, 3):
560560
date = datetime.datetime.strptime(date.text_content().strip(), "%m/%d/%Y")
561561
date = date.date()

0 commit comments

Comments
 (0)