Skip to content

Commit

Permalink
IN: bills improve committee recognition around actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jessemortenson committed Dec 17, 2024
1 parent a75f3b5 commit 52d067b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scrapers/in/bills.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ def scrape(self, session=None):
self.logger.warning("Could not find bill actions page")
actions = []

committee_name_match_regex = r"committee on (.*?)( pursuant to|$)"
for action in actions:
action_desc = action["description"]

Expand Down Expand Up @@ -424,8 +425,9 @@ def scrape(self, session=None):
action_type.append("passage")

# Identify related committee
if "committee on" in action_desc_lower:
committee = action_desc_lower.split("committee on")[-1].strip()
committee_matches = re.search(committee_name_match_regex, action_desc, re.IGNORECASE)
if committee_matches:
committee = committee_matches[1].strip()

# Add action to bill
action_instance = bill.add_action(
Expand Down

0 comments on commit 52d067b

Please sign in to comment.