On google Colaboratory I try to implement a whois script to get informations about spammers.
I do the following :
!pip install python-whois-extended
import whois
Then to test what's inside the module I do the following
dir(whois)
I get this result :
['CACHE_FILE',
'Domain',
'SLOW_DOWN',
'TLD_RE',
'_1_query',
'_2_parse',
'_3_adjust',
'__builtins__',
'__cached__',
'__doc__',
'__file__',
'__loader__',
'__name__',
'__package__',
'__path__',
'__spec__',
'do_parse',
'do_query',
'query',
'tld_regexpr']
But when I try to actually try to use it :
whois.query('myDomain.fr')
I get this error :
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
<ipython-input-3-f1614a16f565> in <module>()
----> 1 whois.query('myDomain.fr')
4 frames
/usr/lib/python3.7/subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session)
1549 if errno_num == errno.ENOENT:
1550 err_msg += ': ' + repr(err_filename)
-> 1551 raise child_exception_type(errno_num, err_msg, err_filename)
1552 raise child_exception_type(err_msg)
1553
FileNotFoundError: [Errno 2] No such file or directory: 'whois': 'whois'
Am I missing something ? What am I doing wrong ?