Accepted-language is set to English to prevent Unocode issues in the location response from openmapquest

This commit is contained in:
zserg 2016-01-27 22:37:29 +03:00
parent 215e95149c
commit 70724d59ac
1 changed files with 2 additions and 1 deletions

View File

@ -161,9 +161,10 @@ def reverse_lookup(lat, lon):
try:
params = {'format': 'json', 'key': key, 'lat': lat, 'lon': lon}
headers = {"Accept-Language": "en-US,en;q=0.5"}
r = requests.get(
'http://open.mapquestapi.com/nominatim/v1/reverse.php?%s' %
urllib.urlencode(params)
urllib.urlencode(params),headers=headers
)
return r.json()
except requests.exceptions.RequestException as e: