Skip to content
This repository has been archived by the owner on Jun 12, 2019. It is now read-only.

Commit

Permalink
Overwrite existing records because they're wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
henare committed Sep 21, 2014
1 parent 422e019 commit 7025395
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scraper.rb
Expand Up @@ -18,10 +18,10 @@
record[:address] = app.children[8].to_s.split(":")[1].strip + ", Mosman, NSW"
record[:council_reference] = app.children[1].text.to_s

if (ScraperWiki.select("* from data where `council_reference`='#{record[:council_reference]}'").empty? rescue true)
# if (ScraperWiki.select("* from data where `council_reference`='#{record[:council_reference]}'").empty? rescue true)
ScraperWiki.save_sqlite([:council_reference], record)
else
puts "Skipping already saved record " + record[:council_reference]
end
# else
# puts "Skipping already saved record " + record[:council_reference]
# end

end

0 comments on commit 7025395

Please sign in to comment.