Skip to content

Commit

Permalink
Merge pull request #5140 from openstates/in-bills-committee-improve
Browse files Browse the repository at this point in the history
IN: bills improve committee recognition around actions
  • Loading branch information
jessemortenson authored Dec 17, 2024
2 parents a75f3b5 + 9c04295 commit 1040e2b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 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,11 @@ 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 1040e2b

Please sign in to comment.