From 9ad95f51d469ec8e4d3677064a81bff0b054d71b Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Sun, 6 Sep 2020 13:57:42 -0700 Subject: [PATCH] Fix whois lookup failing in some instances --- plexpy/helpers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plexpy/helpers.py b/plexpy/helpers.py index 99d7e6f3..fee9ae53 100644 --- a/plexpy/helpers.py +++ b/plexpy/helpers.py @@ -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: