Skip to content

Commit

Permalink
Modernise scraper
Browse files Browse the repository at this point in the history
  • Loading branch information
tmtmtmtm committed Feb 24, 2016
1 parent 82ea13f commit f8ccfca
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions scraper.rb
@@ -1,14 +1,7 @@
#!/bin/env ruby
# encoding: utf-8

require 'scraperwiki'
require 'wikidata/fetcher'

WikiData::Category.new('Կատեգորիա:ՀՀ_ԱԺ_5-րդ_գումարման_պատգամավորներ', 'hy').wikidata_ids.each do |id|
data = WikiData::Fetcher.new(id: id).data('hy') or next
ScraperWiki.save_sqlite([:id], data)
end

require 'rest-client'
warn RestClient.post ENV['MORPH_REBUILDER_URL'], {} if ENV['MORPH_REBUILDER_URL']

names = WikiData::Category.new('Կատեգորիա:ՀՀ_ԱԺ_5-րդ_գումարման_պատգամավորներ', 'hy').member_titles
EveryPolitician::Wikidata.scrape_wikidata(names: { hy: names })

0 comments on commit f8ccfca

Please sign in to comment.