diff --git a/openstates/ut/__init__.py b/openstates/ut/__init__.py index 941bfb3fdb..1d47107c24 100644 --- a/openstates/ut/__init__.py +++ b/openstates/ut/__init__.py @@ -35,7 +35,7 @@ 'name': '2015-2016', 'start_year': 2015, 'end_year': 2016, - 'sessions': ['2015', '2015s1', '2016'], + 'sessions': ['2015', '2015s1', '2016', '2016S2', '2016S3'], }, ], 'session_details': { @@ -110,7 +110,20 @@ 'start_date': datetime.date(2016, 1, 25), 'display_name': '2016 General Session', '_scraped_name': '2016 General Session', - } + }, + #Note: There is no 2016s1, it's 2015s1 + '2016S2': { + 'type': 'special', + 'start_date': datetime.date(2016, 1, 25), + 'display_name': '2016 2nd Special Session', + '_scraped_name': '2016 2nd Special Session', + }, + '2016S3': { + 'type': 'special', + 'start_date': datetime.date(2016, 1, 25), + 'display_name': '2016 3rd Special Session', + '_scraped_name': '2016 3rd Special Session', + } }, 'feature_flags': ['events', 'subjects', 'influenceexplorer'], '_ignored_scraped_sessions': [ diff --git a/openstates/ut/bills.py b/openstates/ut/bills.py index 6415ec2478..5c3749906d 100644 --- a/openstates/ut/bills.py +++ b/openstates/ut/bills.py @@ -34,13 +34,19 @@ def scrape(self, session, chambers): session_search_text = session if "s" not in session.lower() and "h" not in session.lower(): session_search_text += "GS" - + + print session_search_text sessions = sessions.xpath( '//p/a[contains(@href, "{}")]'.format(session_search_text)) session_url = '' + + print sessions + for elem in sessions: + + print re.sub(r'\s+', " ", elem.xpath('text()')[0]) if re.sub(r'\s+', " ", elem.xpath('text()')[0]) == \ self.metadata['session_details'][session]['_scraped_name']: session_url = elem.xpath('@href')[0]