Fix whois lookup failing in some instances

This commit is contained in:
JonnyWong16 2020-09-06 13:57:42 -07:00
parent 0902a61341
commit 9ad95f51d4
No known key found for this signature in database
GPG key ID: B1F1F9807184697A

View file

@ -617,7 +617,8 @@ def whois_lookup(ip_address):
nets = []
err = None
try:
whois = ipwhois.IPWhois(ip_address).lookup_whois(retry_count=0)
whois = ipwhois.IPWhois(ip_address).lookup_whois(retry_count=0,
asn_methods=['dns', 'whois', 'http'])
countries = ipwhois.utils.get_countries()
nets = whois['nets']
for net in nets: