We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86b55b2 commit 3175e1aCopy full SHA for 3175e1a
openlibrary/core/wikidata.py
@@ -202,8 +202,9 @@ def get_wikidata_entity(
202
203
204
def _get_from_web(id: str) -> WikidataEntity | None:
205
+ headers = {'User-Agent': 'OpenLibrary.org Wikidata Integration'}
206
try:
- response = requests.get(f'{WIKIDATA_API_URL}{id}')
207
+ response = requests.get(f'{WIKIDATA_API_URL}{id}', headers=headers)
208
response.raise_for_status()
209
if response.status_code == 200:
210
entity = WikidataEntity.from_dict(
0 commit comments