Skip to content
Snippets Groups Projects
Verified Commit 240c771c authored by Frede H's avatar Frede H :speech_balloon:
Browse files

new geo location service

parent d1d70066
No related branches found
No related tags found
No related merge requests found
......@@ -95,7 +95,7 @@ def get_geoip_country() -> str:
req = urllib.request.Request(url="https://get.geojs.io/v1/ip/geo.json")
res = urllib.request.urlopen(req)
json_obj = json.loads(res.read().decode("utf8"))
if "time_zone" in json_obj:
if "timezone" in json_obj:
tz = json_obj["timezone"]
for country in timezones.countries:
if tz in country["timezones"]:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment