ignore junk results by taking the last registrar details issue #85
authorRichard Penman
Thu, 02 Jun 2016 13:37:33 -0700
changeset 85 0b098688af21
parent 84 98fe26cdbb71
child 86 d6fcfa5acc7b
ignore junk results by taking the last registrar details issue #85
whois/parser.py
--- a/whois/parser.py	Thu Jun 02 13:25:07 2016 -0700
+++ b/whois/parser.py	Thu Jun 02 13:37:33 2016 -0700
@@ -135,6 +135,8 @@
                     if value and value not in values:
                         # avoid duplicates
                         values.append(value)
+                if values and attr in ('registrar', 'whois_server', 'referral_url'):
+                    values = values[-1] # ignore junk
                 if len(values) == 1:
                     values = values[0]
                 elif not values: