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

Commit

Permalink
Always save record as planningalerts now does versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed May 7, 2019
1 parent e5ee296 commit 7fdca9f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions scraper.rb
Expand Up @@ -25,13 +25,9 @@ def scrape_page(page, info_url_base, comment_url)
'date_received' => Date.parse(tr.search("td")[1].inner_text).to_s,
}

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

Expand Down

0 comments on commit 7fdca9f

Please sign in to comment.