Skip to content

Commit

Permalink
WV: scrape actions from invalid HTML tables openstates#181
Browse files Browse the repository at this point in the history
  • Loading branch information
twneale committed Feb 23, 2012
1 parent 27d66f9 commit ac16dd3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions openstates/wv/bills.py
@@ -1,6 +1,5 @@
import os
import re
import time
import datetime
import collections

Expand Down Expand Up @@ -38,7 +37,6 @@ def scrape(self, chamber, session):
self.scrape_bill(session, chamber, bill_id, title,
link.attrib['href'])


# scrape resolutions
res_url = ("http://www.legis.state.wv.us/Bill_Status/res_list.cfm?"
"year=%s&sessiontype=rs&btype=res") % session
Expand Down Expand Up @@ -105,12 +103,11 @@ def scrape_bill(self, session, chamber, bill_id, title, url):
for sponsor in line.split(', '):
bill.add_sponsor('sponsor', sponsor.strip())


for link in page.xpath("//a[contains(@href, 'votes/house')]"):
self.scrape_vote(bill, link.attrib['href'])

actor = chamber
for tr in reversed(page.xpath("//table[@class='tabborder']/tr")[1:]):
for tr in reversed(page.xpath("//table[@class='tabborder']/descendant::tr")[1:]):
tds = tr.xpath('td')
if len(tds) < 3:
continue
Expand Down

0 comments on commit ac16dd3

Please sign in to comment.