Closed firas5673 closed 2 months ago
It looks like this API might require a login.
The following code, which just tries to get a particular page (Asian-Ensligh), returns a forbidden status code.
import requests
r = requests.get("https://yugipedia.com/api.php", params={"prop": "extracts|revisions", "explaintext": "", "rvprop": "ids", "action": "query", "titles":"Asian-English"})
print(r.status_code)
I could make the exception a bit more specific in the case of a forbidden but I can't know for sure if a username and password are required.
When I try using it with 'https://yugipedia.com/api.php', I get an error saying
Even though they DO use MediaWiki.