Accepted-language is set to English to prevent Unocode issues in the location response from openmapquest
This commit is contained in:
parent
215e95149c
commit
70724d59ac
|
@ -161,9 +161,10 @@ def reverse_lookup(lat, lon):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
params = {'format': 'json', 'key': key, 'lat': lat, 'lon': lon}
|
params = {'format': 'json', 'key': key, 'lat': lat, 'lon': lon}
|
||||||
|
headers = {"Accept-Language": "en-US,en;q=0.5"}
|
||||||
r = requests.get(
|
r = requests.get(
|
||||||
'http://open.mapquestapi.com/nominatim/v1/reverse.php?%s' %
|
'http://open.mapquestapi.com/nominatim/v1/reverse.php?%s' %
|
||||||
urllib.urlencode(params)
|
urllib.urlencode(params),headers=headers
|
||||||
)
|
)
|
||||||
return r.json()
|
return r.json()
|
||||||
except requests.exceptions.RequestException as e:
|
except requests.exceptions.RequestException as e:
|
||||||
|
|
Loading…
Reference in New Issue