Question

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.

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top