Skip to content

Commit

Permalink
Remove NY reliance on billy term_for_session function that requires m…
Browse files Browse the repository at this point in the history
…ongodb
  • Loading branch information
showerst committed Nov 29, 2016
1 parent 9b741e5 commit f59846d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions openstates/ny/bills.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def _parse_bill_details(self, bill):

assembly_url = (
'http://assembly.state.ny.us/leg/?default_fld=&bn={bill_id}'
'&Summary=Y&Actions=Y'
'&Summary=Y&Actions=Y&Text=Y'
).format(bill_id=bill_id)

return (senate_url, assembly_url, bill_chamber, bill_type, bill_id,
Expand Down Expand Up @@ -291,12 +291,9 @@ def _scrape_bill(self, session, bill_data):
def scrape(self, session, chambers):
self.api_client = OpenLegislationAPIClient(self)

term_id = term_for_session('ny', session)

for term in reversed(self.metadata['terms']):
if term['name'] == term_id:
if session in term['sessions']:
self.term_start_year = term['start_year']
break

for bill in self._generate_bills(session):
bill_object = self._scrape_bill(session, bill)
Expand Down

0 comments on commit f59846d

Please sign in to comment.