I tried to execute this code:

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

And I got the error above. Why?

4

2 Answers

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

pip uninstall whois pip install python-whois 
1

Try this instead:

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

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.