Skip to content

Commit

Permalink
enabled saving data to database,
Browse files Browse the repository at this point in the history
disabled console output of record
  • Loading branch information
LoveMyData committed May 19, 2017
1 parent a963c00 commit 692b268
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scraper.rb
Expand Up @@ -65,8 +65,8 @@ def is_valid_year(date_str, min=2004, max=DateTime.now.year)

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

0 comments on commit 692b268

Please sign in to comment.