-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Requests to Wiktionary/Wikipedia are currently failing with a 403 Forbidden error.
This is due to a recent change on Wikipedia’s side: automated requests without a User-Agent header are now rejected.
Solution:
Add a descriptive User-Agent header that identifies the purpose of the requests
title = 'stark'
url = f'https://de.wiktionary.org/wiki/Spezial:Exportieren/{title}'
# you can decide what to give, use a descriptive text
headers = {
"User-Agent": "Search for German words"
}
# Send a GET request
resp = requests.get(url, headers=headers)Tasks: update tutorials
Metadata
Metadata
Assignees
Labels
No labels