Permalink
Browse files

Automatic update to make ScraperWiki scraper work on Morph

  • Loading branch information...
Matthew Landauer
Matthew Landauer committed Jan 21, 2014
1 parent f9fe7d2 commit 4dc98a4be5b1e47d5c1825323a0bc08586e85633
Showing with 2 additions and 1 deletion.
  1. +2 −1 scraper.rb
View
@@ -1,3 +1,4 @@
require 'scraperwiki'
require 'mechanize'
agent = Mechanize.new
@@ -22,7 +23,7 @@
'date_scraped' => Date.today.to_s
}
if ScraperWiki.select("* from swdata where `council_reference`='#{record['council_reference']}'").empty?
if ScraperWiki.select("* from data where `council_reference`='#{record['council_reference']}'").empty?
ScraperWiki.save_sqlite(['council_reference'], record)
else
puts "Skipping already saved record " + record['council_reference']

0 comments on commit 4dc98a4

Please sign in to comment.