From e8bfceaf94059ae987f00f1e80b7755e4bbc7298 Mon Sep 17 00:00:00 2001 From: showerst Date: Mon, 11 Dec 2023 16:46:36 -0500 Subject: [PATCH] USA: Bills: Fix congress.gov source links for joint bills (#4749) --- scrapers/usa/bills.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scrapers/usa/bills.py b/scrapers/usa/bills.py index a3dc067fea..c1e517841d 100644 --- a/scrapers/usa/bills.py +++ b/scrapers/usa/bills.py @@ -133,7 +133,10 @@ def parse_bill(self, url): bill.add_source(xml_url) # need to get Congress.gov URL for source & additional versions # https://www.congress.gov/bill/116th-congress/house-bill/1 - cg_url = f"https://congress.gov/bill/{session}th-congress/{chamber_name.lower()}-{classification.lower()}/{bill_num}" + if "J" in bill_type: + cg_url = f"https://congress.gov/bill/{session}th-congress/{chamber_name.lower()}-joint-{classification.lower()}/{bill_num}" + else: + cg_url = f"https://congress.gov/bill/{session}th-congress/{chamber_name.lower()}-{classification.lower()}/{bill_num}" bill.add_source(cg_url) # use cg_url to get additional version for public law