Skip to content

Commit

Permalink
Merge pull request #4905 from NewAgeAirbender/mo_bills
Browse files Browse the repository at this point in the history
MO: add exception if no LongTitle
  • Loading branch information
NewAgeAirbender authored Apr 1, 2024
2 parents a69c285 + 345e447 commit e126039
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scrapers/mo/bills.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,10 @@ def _scrape_lower_chamber(self, session):

def parse_house_bill(self, response, bill_id, bill_year, bill_code, session):
official_title = response.xpath("//BillInformation/CurrentBillString/text()")[0]
bill_desc = response.xpath("//BillInformation/Title/LongTitle/text()")[0]
try:
bill_desc = response.xpath("//BillInformation/Title/LongTitle/text()")[0]
except IndexError:
bill_desc = "No title provided by the state website"
bill_type = "bill"
triplet = bill_id[:3]
if triplet in bill_types:
Expand Down

0 comments on commit e126039

Please sign in to comment.