From e6ce0325fec5c6815b467de6538ef825cd16e6ea Mon Sep 17 00:00:00 2001 From: showerst Date: Mon, 27 Nov 2023 15:49:14 -0500 Subject: [PATCH] VI, GU: Bills: Add additional URL for versions (#4732) * VI: Bills: Add additional URL for versions * GU: Bills: Add resolution PDF links --- scrapers/gu/bills.py | 4 ++++ scrapers/vi/bills.py | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/scrapers/gu/bills.py b/scrapers/gu/bills.py index a74b3dc454..f716133fe4 100644 --- a/scrapers/gu/bills.py +++ b/scrapers/gu/bills.py @@ -267,6 +267,10 @@ def _process_resolution(self, session: str, bill: str, root_url: str): on_duplicate="ignore", ) + bill_obj.add_version_link( + url=bill_link, note="Current Status", media_type="application/pdf" + ) + details = self._get_resolution_details(bill_link) if details.get("IntroducedDate", None): bill_obj.add_action( diff --git a/scrapers/vi/bills.py b/scrapers/vi/bills.py index 607e1e9d1a..2a824d6f93 100644 --- a/scrapers/vi/bills.py +++ b/scrapers/vi/bills.py @@ -198,6 +198,14 @@ def scrape_bill(self, bill_page_url): self.parse_date_actions(bill, bill_page) self.parse_actions(bill, bill_page) + v_url = f"https://billtracking.legvi.org:8082/preview/Bill%2F{bill_no}" + bill.add_version_link( + bill_no, + v_url, + media_type="application/pdf", + on_duplicate="ignore", + ) + yield bill def parse_versions(self, bill, bill_page, bill_no):