It looks like you're printing the results in an IDE, perhaps PyCharm. You need the percentage to encode the encoded version of the string in UTF-8 format:
import urllib
base_url = 'https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvprop=content&format=xml&titles='
name = u"Ángel_Garasa"
print base_url + urllib.quote(name.encode("utf-8"))
It shows: 
In your case, you need to update your code so that the corresponding field from the database is encoded in percent. You only need to encode this field in UTF-8 for percent encoding only.
source
share