You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would propose to mock requests.get in unit tests.
Additionally, I would recommend mimicking browser behavior by adding the user-agent header. Current UA is set to python-requests/2.21.0.
Wikidata can ban all users by UA or network.
I've got next error page from wikidata
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 403 You have been banned until 2019-06-26T17:35:05.645Z, please respect throttling and retry-after headers.</title>
</head>
<body><h2>HTTP ERROR 403</h2>
<p>Problem accessing /bigdata/namespace/wdq/sparql. Reason:
<pre> You have been banned until 2019-06-26T17:35:05.645Z, please respect throttling and retry-after headers.</pre></p><hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.4.12.v20180830</a><hr/>
</body>
</html>
Requests from django can be easily banned by wikidata.
https://github.com/chronhq/backend/blob/master/project/api/models.py#L160-L172
I would propose to mock
requests.get
in unit tests.Additionally, I would recommend mimicking browser behavior by adding the
user-agent
header. Current UA is set topython-requests/2.21.0
.Wikidata can ban all users by UA or network.
I've got next error page from wikidata
Originally posted by @MiklerGM in #127 (comment)
The text was updated successfully, but these errors were encountered: