Skip to content

Commit

Permalink
Merge pull request #1085 from Skekacs93/hotfix/az
Browse files Browse the repository at this point in the history
AZ: fix for missing actions
  • Loading branch information
Andy Lo committed Apr 8, 2016
2 parents 2396469 + 326f792 commit a181f40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openstates/az/bills.py
Expand Up @@ -179,7 +179,7 @@ def scrape_actions(self, chamber, session, bill):
if title != bill['title']:
bill.add_title(title)

for table in base_table.xpath('tr/td/table'):
for table in base_table.xpath('tr/td/table') + root.xpath('//td[@align="left"]/table[not(@class="ContentAreaBackground")]'):
action = table.xpath('string(tr[1]/td[1])').strip()
if action == '':
action = table.xpath('string(tr[1])').strip()
Expand Down Expand Up @@ -295,7 +295,7 @@ def scrape_actions(self, chamber, session, bill):
date = utils.get_date(rows[1][1])
action = action + " " + get_verbose_action(act) # COW ACTION 1 DPA
bill.add_action(actor, action, date, type='other')
if rows[1][0].text_content().strip() == 'Vote Detail':
if len(rows) > 1 and rows[1][0].text_content().strip() == 'Vote Detail':
vote_url = rows[1][0].xpath('string(a/@href)')
self.scrape_votes(actor, vote_url, bill, date,
motion=action, type='other',
Expand Down

0 comments on commit a181f40

Please sign in to comment.