Skip to content

Commit

Permalink
MI: fix for committee sub without number (#5122)
Browse files Browse the repository at this point in the history
  • Loading branch information
showerst authored Dec 9, 2024
1 parent a01b623 commit 61e3d92
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 61e3d92

Please sign in to comment.