Skip to content
Advertisement

Tag: wikipedia

Python request.get error on Wikipedia image URL

Requests.get() does not seem to be returning the expected bytes for Wikipedia image URLs, such as https://upload.wikimedia.org/wikipedia/commons/0/05/20100726_Kalamitsi_Beach_Ionian_Sea_Lefkada_island_Greece.jpg: Answer Most websites block requests that come in without a valid browser as a User-Agent. Wikimedia is one such. which will give you expected output

Python module Wikipedia producing the wrong answer

Code It for some reason changes einstein family to epstein family and i have no idea why does anyone know why this error occurs? Answer Change the to I was looking through the wikipedia.py file and found that auto_suggest can change your RESULTS[i] to a close approximation and so by turning it to False it stops that and gives me

Advertisement