문제

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