Skip to content

Commit

Permalink
Initial scraper
Browse files Browse the repository at this point in the history
  • Loading branch information
tmtmtmtm committed Oct 17, 2017
1 parent 9d0c2a6 commit 4f5ea1b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scraper.rb
@@ -0,0 +1,12 @@
#!/bin/env ruby
# encoding: utf-8

require 'wikidata/fetcher'
require 'pry'

names = EveryPolitician::Wikidata.wikipedia_xpath(
url: 'https://en.wikipedia.org/wiki/List_of_current_members_of_the_National_Assembly_of_Malawi',
xpath: '//table[tr[th[.="Party"]]]//td[1]//a[not(@class="new")]/@title',
)

EveryPolitician::Wikidata.scrape_wikidata(names: { en: names })

0 comments on commit 4f5ea1b

Please sign in to comment.