Skip to content

Need ability to add a User-Agent to SPARQL query requests #62

Open

Description

@hsolbrig

Wikidata has put a set of query limits into place, including the ability to recognize and respond to a HTTP 429 response accompanied by a RETRY-AFTER parameter. It also requires compliance with the USER-AGENT Policy, failure to do as much will result in being "blocked completely".

Activity

  1. self-assigned this
    on Nov 19, 2019
  2. added a commit that references this issue on Nov 19, 2019
  3. ross-spencer commented on May 18, 2020

    @ross-spencer

    @hsolbrig thanks for the changes in 2617cd0.

    I was receiving 429 responses from Wikidata today. I was trying an example like in: https://github.com/hsolbrig/PyShEx/blob/master/notebooks/SPARQLEndpoints.ipynb. If it look at the agent, something like:

    sparql_query = SPARQLQuery(endpoint, sparql)
    print(sparql_query.endpoint.agent)

    Then I am seeing the sparqlwrapper agent return, e.g. sparqlwrapper 1.8.5 (rdflib.github.io/sparqlwrapper). I am wondering if you're seeing the same as me when importing PyShex as a library?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions