From c3a59d735b024789a52763c2b69d7c76c5b1ab0b Mon Sep 17 00:00:00 2001 From: showerst Date: Thu, 9 Nov 2023 09:12:33 -0500 Subject: [PATCH] FL: tighten senate bill xpath, and improve error messaging. (#4717) --- scrapers/fl/bills.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scrapers/fl/bills.py b/scrapers/fl/bills.py index 2d3d886dc3..8f98c9a801 100644 --- a/scrapers/fl/bills.py +++ b/scrapers/fl/bills.py @@ -57,7 +57,7 @@ def process_page(self): class BillList(HtmlListPage): - selector = XPath("//a[contains(@href, '/Session/Bill/')]") + selector = XPath("//th/a[contains(@href, '/Session/Bill/')]") next_page_selector = XPath("//a[@class='next']/@href") dependencies = {"subjects": SubjectPDF} @@ -99,7 +99,7 @@ def process_item(self, item): elif bill_id.startswith(("SM ", "HM ")): bill_type = "memorial" else: - raise ValueError("Failed to identify bill type.") + raise ValueError(f"Failed to identify bill type for {bill_id}") bill = Bill( bill_id,