# HG changeset patch # User richardpenman # Date 1517859800 18000 # Node ID c385321ec3e435fa2b9f3a69b8a95f4ee6118519 # Parent 3b39f61b8a81c83b4287db43847af6b99aab7e61 fixed python 3 byte error diff -r 3b39f61b8a81 -r c385321ec3e4 whois/whois.py --- a/whois/whois.py Mon Feb 05 14:40:21 2018 -0500 +++ b/whois/whois.py Mon Feb 05 14:43:20 2018 -0500 @@ -75,7 +75,7 @@ whois server for getting contact details. """ nhost = None - match = re.compile('Domain Name: ' + query + '\s*.*?Whois Server: (.*?)\s', flags=re.IGNORECASE|re.DOTALL).search(buf) + match = re.compile('Domain Name: {}\s*.*?Whois Server: (.*?)\s'.format(query), flags=re.IGNORECASE|re.DOTALL).search(buf) if match: nhost = match.groups()[0] # if the whois address is domain.tld/something then