Skip to content

Commit

Permalink
MI: fix for committee sub without number (openstates#5122)
Browse files Browse the repository at this point in the history
  • Loading branch information
showerst authored and DGieseke committed Dec 13, 2024
1 parent 8ec1186 commit bc17475
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scrapers/mi/bills.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,12 @@ def scrape_actions(self, bill: Bill, page: lxml.html.HtmlElement):
if "substitute" in action.lower() and row.xpath("td[3]/a/@href"):
version_url = row.xpath("td[3]/a/@href")[0]
sub = re.search(r"\(.*?\)", action)
version_name = f"Substitute {sub.group(0)}"

if sub:
version_name = f"Substitute {sub.group(0)}"
elif "committee of the whole" in action.lower():
version_name = "Substitute, reported by Committee of the Whole"

if version_name in seen_subs:
seen_subs[version_name] += 1
version_name = f"{version_name} - {seen_subs[version_name]}"
Expand Down

0 comments on commit bc17475

Please sign in to comment.