From 01787b510c4e343f80de03e0be9673feb7706e43 Mon Sep 17 00:00:00 2001 From: Igor Chubin Date: Wed, 3 Jan 2024 17:00:03 +0100 Subject: [PATCH] Change geo ip service --- lib/location.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/location.py b/lib/location.py index f457c3f..9fe904d 100644 --- a/lib/location.py +++ b/lib/location.py @@ -102,7 +102,7 @@ def _geolocator(location): if random.random() < 0: geo = requests.get('%s/%s' % (GEOLOCATOR_SERVICE, location)).text else: - geo = requests.get("http://127.0.0.1:8083/:geo-location?location=%s" % location).text + geo = requests.get("http://127.0.0.1:8085/:geo-location?location=%s" % location).text except requests.exceptions.ConnectionError as exception: print("ERROR: %s" % exception) return None @@ -152,7 +152,7 @@ def _ipcache(ip_addr): """ ## Use Geo IP service when available - r = requests.get("http://127.0.0.1:8083/:geo-ip-get?ip=%s" % ip_addr) + r = requests.get("http://127.0.0.1:8085/:geo-ip-get?ip=%s" % ip_addr) if r.status_code == 200 and ";" in r.text: _, country, region, city, *_ = r.text.split(';') return city, region, country