diff --git a/appPublic/iplocation.py b/appPublic/iplocation.py index b9742f9..5b69dfa 100644 --- a/appPublic/iplocation.py +++ b/appPublic/iplocation.py @@ -24,6 +24,13 @@ def ipip(ip=None): 'city':r[2] } +def ip_api_com(ip): + url = f'http://ip-api.com/json/{ip}' + hc = Http_Client() + r = hc.get(url) + r['City'] = r['city'] + return r + def iplocation(ip=None): if ip is None: ip = get_outip() @@ -71,6 +78,7 @@ def ipaddress_com(ip=None): def get_ip_location(ip): apis = { + "ip-api":ip_api_com, "ipaddress":ipaddress_com, "ipip.net":ipip, "iplocation":iplocation, diff --git a/setup.py b/setup.py index 168fafe..dc22193 100755 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ except ImportError: # python setup.py bdist_egg generate a egg file # Release information about eway -version = "5.1.5" +version = "5.1.6" name = "appPublic" description = "appPublic" author = "yumoqing"