From 2ec15de5a09eae3b8ec541d78b237def50ab99c5 Mon Sep 17 00:00:00 2001 From: Miles Watkins Date: Fri, 17 Apr 2015 14:34:44 -0400 Subject: [PATCH 1/3] OH: Add new action and bill codes --- openstates/oh/bills.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/openstates/oh/bills.py b/openstates/oh/bills.py index f81b00fc91..5f959046f9 100644 --- a/openstates/oh/bills.py +++ b/openstates/oh/bills.py @@ -59,7 +59,13 @@ def scrape(self, session, chambers): "intro_107": ["bill:introduced","bill:passed"], "imm_consid_360": "bill:passed", "refer_213":"other", - "adopt_reso_100":"bill:passed"} + "adopt_reso_100":"bill:passed", + "msg_507":"amendment:passed", + "confer_713":"other", + "concur_603":"other", + "confer_712":"other", + "msg_506":"amendment:failed", + } base_url = "http://search-prod.lis.state.oh.us" @@ -272,7 +278,9 @@ def add_document(self,documents,bill_id,type_of_document,bill,base_url): "ICS":"", "RCS":"", "EN":"Enacted", - "RCH":"Re-referred"} + "RCH":"Re-referred", + "PHC":"" + } for item in documents: if type_of_document == "amendment": @@ -289,7 +297,10 @@ def add_document(self,documents,bill_id,type_of_document,bill,base_url): try: ver = leg_ver_types[item["legacyver"]] except KeyError: - self.logger.warning("New legacyver type {}, add it to the leg_ver_types dictionary".format(item["legacyver"])) + self.logger.warning( + "New legacyver; check the type and add it to the " + "leg_ver_types dictionary: {} ({})".format( + item["legacyver"], item['link'])) ver = "" if ver: name = name+": "+ver From ce68e7d6ade313c8612c3d161caac82a99bc91d6 Mon Sep 17 00:00:00 2001 From: Miles Watkins Date: Fri, 17 Apr 2015 14:36:05 -0400 Subject: [PATCH 2/3] OH: Reduce bills per page to reduce API response time --- openstates/oh/bills.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openstates/oh/bills.py b/openstates/oh/bills.py index 5f959046f9..a981a249da 100644 --- a/openstates/oh/bills.py +++ b/openstates/oh/bills.py @@ -234,7 +234,7 @@ def scrape(self, session, chambers): self.save_bill(bill) def pages(self,base_url, first_page): - page = self.get(first_page+"?per_page=300") + page = self.get(first_page) page = page.json() yield page while "nextLink" in page: From ee4bc9f3af0fce8f85a4b8b5dc06a7e74d12c91a Mon Sep 17 00:00:00 2001 From: Miles Watkins Date: Fri, 17 Apr 2015 14:49:18 -0400 Subject: [PATCH 3/3] OH: Add another passage action code --- openstates/oh/bills.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openstates/oh/bills.py b/openstates/oh/bills.py index a981a249da..a055783834 100644 --- a/openstates/oh/bills.py +++ b/openstates/oh/bills.py @@ -65,6 +65,7 @@ def scrape(self, session, chambers): "concur_603":"other", "confer_712":"other", "msg_506":"amendment:failed", + "receive_message_100":"bill:passed", }