Skip to content

Commit 68c32cf

Browse files
author
ST47
committed
Fix some errors when an ASN is not present
1 parent 72a170f commit 68c32cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

public_html/gateway.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ def lookup(ip, rdap=False):
5050
obj = IPWhois(ip)
5151
if rdap:
5252
# TODO: RDAP output includes less relevant info, needs a dedicated formatter
53-
return obj.lookup_rdap()
53+
return obj.lookup_rdap(asn_methods=['dns', 'whois', 'http'])
5454
else:
55-
ret = obj.lookup_whois(get_referral=True)
55+
ret = obj.lookup_whois(get_referral=True, asn_methods=['dns', 'whois', 'http'])
5656
# remove some fields that clutter
5757
for x in ['raw', 'raw_referral']:
5858
ret.pop(x, None)

0 commit comments

Comments
 (0)