Skip to content

Commit

Permalink
Also find via Wikidata
Browse files Browse the repository at this point in the history
  • Loading branch information
tmtmtmtm committed Jan 24, 2019
1 parent 00bcbc0 commit 90f63e8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scraper.rb
Expand Up @@ -29,4 +29,12 @@ def members
)
raise "No names at #{url}" if wp_names.empty?

EveryPolitician::Wikidata.scrape_wikidata(names: { en: morph_names | wp_names })
sparq = <<EOQ
SELECT DISTINCT ?item WHERE {
?item p:P39 [ ps:P39 wd:Q13217683 ; pq:P580 ?start ] .
FILTER (?start >= "1977-01-01T00:00:00Z"^^xsd:dateTime)
}
EOQ
ids = EveryPolitician::Wikidata.sparql(sparq)

EveryPolitician::Wikidata.scrape_wikidata(ids: ids, names: { en: morph_names | wp_names })

0 comments on commit 90f63e8

Please sign in to comment.