我正在研究Whois解决方案。 我必须执行Whois才能返回域名。
对所有错误的询问方法表示抱歉,但这是我的第一个问题。
这是我编写的代码段:
def performWhois(domainName):
if domainName == 'google-public-dns-a.google.com': return 'Google LLC' # With google whois doesn't return a domain name
result = whois.whois(domainName)
return result.domain_name
这是我在执行时检索的回溯:
socket.error: [Errno 104] Connection reset by peer while using python whois module