Skip to content

Commit

Permalink
Upped AK max bill number to 9999 and fixed blank journal entries brea…
Browse files Browse the repository at this point in the history
…king scraper
  • Loading branch information
showerst committed Jul 13, 2016
1 parent f886e39 commit a7f878a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions openstates/ak/bills.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def scrape(self, chamber, session):
for abbr in bill_abbrs:
bill_type = bill_types[abbr[1:]]
bill_list_url = ('http://www.legis.state.ak.us/basis/range_multi'
'.asp?session=%s&bill1=%s1&bill2=%s999' %
'.asp?session=%s&bill1=%s1&bill2=%s9999' %
(session, abbr, abbr)
)
doc = lxml.html.fromstring(self.get(bill_list_url).text)
Expand Down Expand Up @@ -207,7 +207,10 @@ def parse_vote(self, bill, action, act_chamber, act_date, url,

html = self.get(url).text
doc = lxml.html.fromstring(html)


if len(doc.xpath('//pre')) < 2:
return

# Find all chunks of text representing voting reports.
votes_text = doc.xpath('//pre')[1].text_content()
votes_text = re_vote_text.split(votes_text)
Expand Down

0 comments on commit a7f878a

Please sign in to comment.