Skip to content

Commit

Permalink
Merge pull request #4934 from NewAgeAirbender/ga_bills
Browse files Browse the repository at this point in the history
GA: add dedupe to Votes
  • Loading branch information
NewAgeAirbender authored Apr 30, 2024
2 parents 9fb1c37 + e74cf7b commit 076ca7c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scrapers/ga/bills.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,12 @@ def scrape(self, session=None, chamber=None):
for listed_vote in vote_listing:

listed_vote = backoff(self.vservice.GetVote, listed_vote["VoteId"])
date = listed_vote["Date"].strftime("%Y-%m-%d")
text = listed_vote["Caption"] or "Vote on Bill"

vote = VoteEvent(
start_date=listed_vote["Date"].strftime("%Y-%m-%d"),
motion_text=listed_vote["Caption"] or "Vote on Bill",
start_date=date,
motion_text=text,
chamber={"House": "lower", "Senate": "upper"}[
listed_vote["Branch"]
],
Expand All @@ -201,6 +203,7 @@ def scrape(self, session=None, chamber=None):
)

vote.add_source(self.vsource)
vote.dedupe_key = f"{bill}#{date}#{text}"

methods = {"Yea": "yes", "Nay": "no"}

Expand Down

0 comments on commit 076ca7c

Please sign in to comment.