Skip to content

Commit 6f252e1

Browse files
Merge pull request #5702 from openstates/il-bills-add-appointments-type-support
IL: bills: add support for AM bill type via bill_type_abbrv param
2 parents f2f6d98 + 8630e54 commit 6f252e1

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

scrapers/il/bills.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,10 @@ def scrape(self, session=None, chamber=None, bill_type_abbrv=None):
319319
else:
320320
chamber_list = ["lower", "upper"]
321321

322-
if bill_type_abbrv and bill_type_abbrv not in DOC_TYPES.keys():
322+
# Note AM is the special case for Appointments
323+
if bill_type_abbrv == "AM":
324+
bill_type_list = []
325+
elif bill_type_abbrv and bill_type_abbrv not in DOC_TYPES.keys():
323326
self.error(f"Invalid bill_type_abbrv: {bill_type_abbrv}")
324327
elif bill_type_abbrv:
325328
bill_type_list = {bill_type_abbrv: DOC_TYPES[bill_type_abbrv]}
@@ -353,7 +356,7 @@ def scrape(self, session=None, chamber=None, bill_type_abbrv=None):
353356
)
354357

355358
# special non-chamber cases, if no bill type abbreviation is specified
356-
if not bill_type_abbrv:
359+
if not bill_type_abbrv or bill_type_abbrv == "AM":
357360
for bill_url in self.get_bill_urls(chamber, session_id, "AM"):
358361
yield from self.scrape_bill(
359362
chamber, session_id, "AM", bill_url, "appointment"

0 commit comments

Comments
 (0)