Update geo ip misc plugin
This commit is contained in:
parent
9db72f41fd
commit
e2210f3eab
|
@ -24,7 +24,7 @@ import json
|
|||
|
||||
def geoiplookup(ip):
|
||||
http = urllib3.PoolManager()
|
||||
r = http.request('GET', f'https://api.geoiplookup.net/?query={ip}&json=true')
|
||||
r = http.request('GET', f'http://ip-api.com/json/{ip}')
|
||||
|
||||
if r.status != 200:
|
||||
raise Exception(r)
|
||||
|
|
|
@ -85,8 +85,8 @@ class IWLADisplayFilterUsers(IPlugin):
|
|||
isp = location.get('isp', '')
|
||||
str_location = ''
|
||||
city = location.get('city', unknown)
|
||||
country = location.get('countryname', unknown)
|
||||
if location.get('city', '') or location.get('countryname'):
|
||||
country = location.get('country', unknown)
|
||||
if location.get('city', '') or location.get('country', ''):
|
||||
str_location = f'{city}/{country}'
|
||||
if isp:
|
||||
if str_location: str_location += '<br/>'
|
||||
|
|
Loading…
Reference in New Issue
Block a user