shira stenmetz
shira stenmetz

Reputation: 293

AttributeError: 'module' object has no attribute 'whois'

I tried to execute this code:

import whois
w = whois.whois('webscraping.com')
print w

And I got the error above. Why?

Upvotes: 3

Views: 13723

Answers (2)

Oleg S
Oleg S

Reputation: 131

Wrong library, solution is to remove old one and install new :

pip uninstall whois 
pip install python-whois

Upvotes: 13

Erik Rydén
Erik Rydén

Reputation: 21

Try this instead:

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

Upvotes: 2

Related Questions