Skip to content

Commit

Permalink
Get NM 2016 ss scraping again
Browse files Browse the repository at this point in the history
  • Loading branch information
showerst committed Oct 1, 2016
1 parent ca44014 commit 119d06b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 9 additions & 1 deletion openstates/nm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
'name': '2015-2016',
'start_year': 2015,
'end_year': 2016,
'sessions': ['2015', '2015S', '2016'],
'sessions': ['2015', '2015S', '2016', '2016S'],
}
],
'session_details': {
Expand Down Expand Up @@ -86,6 +86,14 @@
'slug': '16%20Regular',
'_scraped_name': '2016 Regular',
},
'2016S': {
'type': 'special',
'start_date': datetime.date(2016, 9, 30),
'end_date': datetime.date(2016, 10, 1),
'display_name': '2016 2nd Special Session',
'slug': '16%20Special',
'_scraped_name': '2016 2nd Special',
},
},
'feature_flags': ['subjects', 'influenceexplorer'],
'_ignored_scraped_sessions': [
Expand Down
6 changes: 4 additions & 2 deletions openstates/nm/bills.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,10 @@ class NMBillScraper(BillScraper):
categorizer = Categorizer()

def _init_mdb(self, session):
print session[2:]
ftp_base = 'ftp://www.nmlegis.gov/other/'
fname = 'LegInfo{}'.format(session[2:])
#session slug here?
fname = 'LegInfo{}'.format('16 Special')
fname_re = '(\d{{2}}-\d{{2}}-\d{{2}} \d{{2}}:\d{{2}}(?:A|P)M) .* '\
'({fname}.*zip)'.format(fname=fname)

Expand All @@ -114,7 +116,7 @@ def _init_mdb(self, session):
remote_file = ftp_base + matches[-1][1]

# all of the data is in this Access DB, download & retrieve it
mdbfile = '%s.mdb' % fname
mdbfile = '%s.accdb' % fname

# if a new mdbfile or it has changed
if getattr(self, 'mdbfile', None) != mdbfile:
Expand Down

0 comments on commit 119d06b

Please sign in to comment.