Skip to content

Commit 30ebafe

Browse files
Merge pull request #5703 from openstates/wv-bills-fix-bill-selector
WV: bills: more specific selector to avoid spurious links in list
2 parents 6f252e1 + 76ef8cd commit 30ebafe

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

scrapers/wv/bills.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ def scrape_chamber(self, chamber, session):
8585
# "https://www.wvlegislature.gov/Bill_Status/Bills_history.cfm?input=500&year=2020&sessiontype=RS&btype=bill",
8686
# )
8787

88-
for link in page.xpath("//a[contains(@href, 'Bills_history')]"):
88+
# First column in the results table contains a link to bill, text of link is bill ID
89+
for link in page.xpath("//table[@id='results']//tr/td[1]/a"):
8990
bill_id = link.xpath("string()").strip()
9091
title = link.xpath("string(../../td[2])").strip()
9192
if not title:

0 commit comments

Comments
 (0)