diff options
author | Thomas Pointhuber <thomas.pointhuber@gmx.at> | 2014-11-03 18:53:04 +0100 |
---|---|---|
committer | Thomas Pointhuber <thomas.pointhuber@gmx.at> | 2014-11-03 18:53:04 +0100 |
commit | bc12a76fbbfdb4769a254cda5e3cfdf262765107 (patch) | |
tree | 033364b980b468f644e986fd8663860e322b01ac /searx/engines/openstreetmap.py | |
parent | 3b7b106684a1dc899823bcef533e5892f7a813da (diff) | |
download | searxng-bc12a76fbbfdb4769a254cda5e3cfdf262765107.tar.gz searxng-bc12a76fbbfdb4769a254cda5e3cfdf262765107.zip |
[fix] use address.city if possible
Diffstat (limited to 'searx/engines/openstreetmap.py')
-rw-r--r-- | searx/engines/openstreetmap.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/searx/engines/openstreetmap.py b/searx/engines/openstreetmap.py index e5deba1e5..db0fbfe75 100644 --- a/searx/engines/openstreetmap.py +++ b/searx/engines/openstreetmap.py @@ -64,7 +64,9 @@ def response(resp): if address.get('name'): address.update({'house_number':address_raw.get('house_number'), 'road':address_raw.get('road'), - 'locality':address_raw.get('town', address_raw.get('village')), + 'locality':address_raw.get('city', + address_raw.get('town', + address_raw.get('village'))), 'postcode':address_raw.get('postcode'), 'country':address_raw.get('country'), 'country_code':address_raw.get('country_code')}) |