Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HI: add index to dedupe #4911

Merged
merged 1 commit into from
Apr 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scrapers/hi/bills.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down
Loading