mirror of
https://github.com/ValdikSS/blockcheck.git
synced 2026-09-14 11:05:48 +05:00
except on ASN lookups
This commit is contained in:
parent
1f18a128e2
commit
988e0e7455
@ -808,7 +808,7 @@ def get_ispinfo(ipaddr):
|
||||
rdap_response = IPWhois(ipaddr)
|
||||
ispinfo = rdap_response.lookup_rdap(depth=1)
|
||||
return ispinfo['asn']
|
||||
except:
|
||||
except(ipwhois.exceptions.ASNRegistryError, ipwhois.exceptions.ASNLookupError, ASNParseError, ASNOriginLookupError):
|
||||
return False
|
||||
|
||||
def main():
|
||||
|
||||
Loading…
Reference in New Issue
Block a user