Bugfixes, Readme

This commit is contained in:
2024-01-16 18:14:13 +01:00
parent 3636e3ffac
commit af63b5ad43
6 changed files with 55 additions and 57 deletions

View File

@@ -1,9 +1,7 @@
import urllib.request, json
from threading import Thread
class Location(Thread):
class Location():
def __init__(self):
Thread.__init__(self)
self.GEO_URL = "https://get.geojs.io/v1/ip/geo.json"
def run(self) -> dict:
@@ -11,7 +9,7 @@ class Location(Thread):
data = json.load(request)
self.result = {
return {
"latitude": data["latitude"],
"longitude": data["longitude"]
}