From 326f7920c3d2980c501668ec7789ff44e497c471 Mon Sep 17 00:00:00 2001 From: Skekacs93 Date: Fri, 8 Apr 2016 01:24:34 +0000 Subject: [PATCH] AZ: fix for missing actions --- openstates/az/bills.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openstates/az/bills.py b/openstates/az/bills.py index 28c82b5219..d7fc461a30 100644 --- a/openstates/az/bills.py +++ b/openstates/az/bills.py @@ -177,7 +177,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() @@ -293,7 +293,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',