some IP's have no information about the provider or asn
This commit is contained in:
parent
595bb74543
commit
dfe0323283
@ -21,9 +21,13 @@ def main():
|
||||
jrequest = requests.get(url).json()
|
||||
#print(jrequest)
|
||||
d = jrequest[ip]
|
||||
try:
|
||||
asn = d["asn"]
|
||||
provider = d["provider"]
|
||||
country = d["country"]
|
||||
except Exception:
|
||||
print(f'failed: {jrequest}')
|
||||
continue
|
||||
with get_connection() as conn:
|
||||
with conn.cursor() as cur:
|
||||
sql_statement = """
|
||||
|
Loading…
Reference in New Issue
Block a user