fix for many results
authorRichard Penman
Fri, 03 Feb 2017 16:17:46 +0800
changeset 124 dfa8657bdefc
parent 123 03c72d0d1182
child 125 43027d307ba4
fix for many results
whois/__init__.py
whois/whois.py
--- a/whois/__init__.py	Fri Jan 20 16:10:33 2017 +0800
+++ b/whois/__init__.py	Fri Feb 03 16:17:46 2017 +0800
@@ -59,6 +59,8 @@
     stackoverflow.com
     >>> print(extract_domain('102.112.2O7.net'))
     2o7.net
+    >>> print(extract_domain('globoesporte.globo.com'))
+    globo.com
     >>> print(extract_domain('1-0-1-1-1-0-1-1-1-1-1-1-1-.0-0-0-0-0-0-0-0-0-0-0-0-0-10-0-0-0-0-0-0-0-0-0-0-0-0-0.info'))
     0-0-0-0-0-0-0-0-0-0-0-0-0-10-0-0-0-0-0-0-0-0-0-0-0-0-0.info
     """
--- a/whois/whois.py	Fri Jan 20 16:10:33 2017 +0800
+++ b/whois/whois.py	Fri Feb 03 16:17:46 2017 +0800
@@ -111,7 +111,7 @@
             if hostname == NICClient.DENICHOST:
                 query_bytes = "-T dn,ace -C UTF-8 " + query
             elif hostname.endswith(NICClient.QNICHOST_TAIL) and many_results:
-                query_bytes = '='
+                query_bytes = '=' + query
             else:
                 query_bytes = query
             s.send((query_bytes) + b"\r\n")