Skip to content

Commit

Permalink
Merge pull request #1 from everypolitician-scrapers/drop-table-before…
Browse files Browse the repository at this point in the history
…-each-run

Remove table from database before scraping
  • Loading branch information
tmtmtmtm committed May 12, 2017
2 parents 4a10d78 + a2d9f8c commit 90c5223
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scraper.rb
Expand Up @@ -8,7 +8,7 @@

require_relative 'lib/politician'

ScraperWiki.sqliteexecute('DELETE FROM data') rescue nil
ScraperWiki.sqliteexecute('DROP TABLE data') rescue nil
house = EveryPolitician::Index.new.country('Finland').lower_house
house.popolo.persons.map(&:wikidata).compact.each_slice(100) do |wanted|
data = Wikisnakker::Politician.find(wanted).flat_map(&:positions).compact
Expand Down

0 comments on commit 90c5223

Please sign in to comment.