我想抓取100页维基百科,所以我想每次将wikiPageID增加1。我该怎么办?
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT * WHERE {
?saket dbo:wikiPageID 57570.
?saket foaf:isPrimaryTopicOf ?wikilink.
OPTIONAL {
?saket dbp:birthPlace ?birth.}
OPTIONAL {
?saket dbp:dateOfBirth ?dob.}
OPTIONAL{
?saket dbp:nationality ?country.}
OPTIONAL{
?saket dbp:occupation ?occupation.}
}
答案 0 :(得分:2)
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT * WHERE {
?saket dbo:wikiPageID ?id .
?saket foaf:isPrimaryTopicOf ?wikilink.
FILTER(?id >= 100 && ?id < 200)
OPTIONAL {
?saket dbp:birthPlace ?birth.}
OPTIONAL {
?saket dbp:dateOfBirth ?dob.}
OPTIONAL{
?saket dbp:nationality ?country.}
OPTIONAL{
?saket dbp:occupation ?occupation.}
}