I am trying to run the following code on Windows Powershell, but it gives an error "Module is not callable."

import whois
w = whois.whois('yahoo.com')

print w

What am I doing wrong? I even pip installed the whois module. Still no difference.

Please help.

有帮助吗?

解决方案

It appears that the whois documentation is out of date; change the line to

w = whois.query('yahoo.com')

You can do help(whois) in an interactive terminal (after import whois) to see more up-to-date documentation.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top