From 540093650bf5a6155d71c1abd92bf89ffce12053 Mon Sep 17 00:00:00 2001 From: NewAgeAirbender <34139325+NewAgeAirbender@users.noreply.github.com> Date: Sun, 7 Apr 2024 23:59:48 -0500 Subject: [PATCH] HI: add index to dedupe --- scrapers/hi/bills.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scrapers/hi/bills.py b/scrapers/hi/bills.py index f640460851..0b07cb1a10 100644 --- a/scrapers/hi/bills.py +++ b/scrapers/hi/bills.py @@ -80,7 +80,7 @@ def parse_bill_actions_table( # vote types that have been reconsidered since last vote of that type reconsiderations = set() - for action in action_table.xpath("*")[1:]: + for index, action in enumerate(action_table.xpath("*")[1:]): date = action[0].text_content() date = dt.datetime.strptime(date, "%m/%d/%Y").strftime("%Y-%m-%d") actor_code = action[1].text_content().upper() @@ -137,7 +137,7 @@ def parse_bill_actions_table( vote.set_count("yes", int(yays or 0)) vote.set_count("no", int(nays or 0)) vote.set_count("not voting", int(v["n_excused"] or 0)) - vote.dedupe_key = f"{bill_id}#{date}#{string[:300]}" + vote.dedupe_key = f"{index}#{bill_id}#{date}#{string[:300]}" for voter in split_specific_votes(v["yes"]): voter = self.clean_voter_name(voter) vote.yes(voter)