As of today, I get HTTP 403 Forbidden when running queries against Wikidata using SPARQLWrapper.
E.g. the following results in 403:
from SPARQLWrapper import JSON, SPARQLWrapper
sparql_wrapper = SPARQLWrapper(
"https://query.wikidata.org/bigdata/namespace/wdq/sparql"
)
sparql_wrapper.setReturnFormat(JSON)
sparql_wrapper.setQuery("select * where {?s ?p ?o} limit 1")
sparql_wrapper.query()
The problem does not occur when I explicitly set the user agent with the agent parameter in SPARQLWrapper.
I know that this has been discussed before (see #139) and I know that the Wikidata user agent policy requires/recommends to set the agent parameter with SPARQLWrapper.
What puzzles me is that not setting the agent explicitly worked until today.
As of today, I get
HTTP 403 Forbidden
when running queries against Wikidata usingSPARQLWrapper
.E.g. the following results in 403:
The problem does not occur when I explicitly set the user agent with the
agent
parameter inSPARQLWrapper
.I know that this has been discussed before (see #139) and I know that the Wikidata user agent policy requires/recommends to set the
agent
parameter withSPARQLWrapper
.What puzzles me is that not setting the
agent
explicitly worked until today.