Skip to content

Commit

Permalink
Use strings for scraperwiki lib's sake
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed Apr 29, 2014
1 parent 438123b commit 8454f36
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scraper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

page.search('.search-filter-results li').each do |li|
record = {
name: li.at('.title').inner_text.strip,
url: li.at('.title a')["href"],
member_for: li.search('dl dd')[0].inner_text,
party: li.search('dl dd')[1].inner_text
"name" => li.at('.title').inner_text.strip,
"url" => li.at('.title a')["href"],
"member_for" => li.search('dl dd')[0].inner_text,
"party" => li.search('dl dd')[1].inner_text
}
ScraperWiki.save_sqlite(["name"], record)

This comment has been minimized.

Copy link
@henare

henare Apr 29, 2014

Member

You can use symbols. You'd just need to change this line to: ScraperWiki.save_sqlite([:name], record)

end

0 comments on commit 8454f36

Please sign in to comment.