Permalink
Browse files

Merge branch 'master' of github.com:sunlightlabs/openstates

  • Loading branch information...
2 parents 7e106ac + 2659f6d commit a309e6926111079bbc452b393dc836326e7c9c80 @twneale twneale committed Mar 6, 2012
Showing with 8 additions and 4 deletions.
  1. +5 −3 openstates/md/bills.py
  2. +3 −1 openstates/ok/bills.py
View
@@ -89,13 +89,15 @@ def parse_bill_actions(self, doc, bill):
for dt in dts:
action_date = dt.text.strip()
if action_date != 'No Action':
+ year = int(bill['session'][:4])
+ action_date += ('/%s' % year)
action_date = datetime.datetime.strptime(action_date,
- '%m/%d')
+ '%m/%d/%Y')
+
# no actions after June?, decrement the year on these
- year = int(bill['session'][:4])
if action_date.month > 6:
year -= 1
- action_date = action_date.replace(year)
+ action_date = action_date.replace(year)
# iterate over all dds following the dt
dcursor = dt
View
@@ -187,13 +187,15 @@ def scrape_votes(self, bill, url):
break
match = re.match(
- r'(YEAS|VAC[ANT]?|NAYS|EXCUSED|CONSTITUTIONAL PRIVILEGE|NOT VOTING)\s*:\s*(\d+)',
+ r'(YEAS|NAYS|EXCUSED|VACANT|CONSTITUTIONAL PRIVILEGE|NOT VOTING)\s*:\s*(\d+)',
line)
if match:
if match.group(1) == 'YEAS':
vtype = 'yes'
elif match.group(1) == 'NAYS':
vtype = 'no'
+ elif match.group(1) == 'VACANT':
+ continue # skip these
else:
vtype = 'other'
counts[vtype] += int(match.group(2))

0 comments on commit a309e69

Please sign in to comment.