pull/618/head
Usama015 2023-06-20 14:45:51 +05:00
parent 0c9550fae5
commit fe1dc07de8
1 changed files with 1 additions and 2 deletions

View File

@ -51,8 +51,7 @@ def handler(q=False):
query = requests.get(f"https://api.ipgeolocation.io/ipgeo?apiKey={apiKey}&ip={ip}")
if query.status_code != 200:
return {'error': f'Error while querying ipGeolocation.io - {query.status_code}: {query.reason}'}
query = query.json()
# Check if the IP address is not reserved for special use
if query.get('message'):
if 'bogon' in query['message']: