Skip to content

Commit

Permalink
Can extract term number with .to_i
Browse files Browse the repository at this point in the history
3rd Parliament becomes 3, etc.
  • Loading branch information
tmtmtmtm committed Jan 6, 2016
1 parent 547195c commit ff1fd7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scraper.rb
Expand Up @@ -87,7 +87,7 @@ def scrape_person(i)
combos.each do |t|
data = person.merge(t)
data[:party] = data[:party].sub('Parliamentary Group of ','').sub('Independent Members of Parliament', 'Independent')
data[:term] = data[:term][/^(\d+)/, 1] rescue binding.pry
data[:term] = data[:term].to_i
ScraperWiki.save_sqlite([:id, :term, :party, :start_date], data)
end
end
Expand Down

0 comments on commit ff1fd7f

Please sign in to comment.