using python for whois queries
installing whois with the PIP command
Pip Install Python-whois
Python 2.7.6 (default, OCT 2016, 20:30:19)
[GCC 4.8.4] on linux2
Type ' help ', ' copyright ', ' credits ' or ' Licens E "For more information.
" >>> import whois
>>>
How to use the installation successfully
[GCC 4.8.4] on linux2
Type ' help ', ' copyright ', ' credits ' or ' license ' for the more information.
>>> Import whois
Use
Whois.whois (URL)
To query the WHOIS information for the domain name
>>> data = Whois.whois ("Www.wangjunx.top")
>>> data
{u ' updated_date ': Datetime.datetime ( 2017, 7, 6, 2,,, U ' status ': U ' OK Https://icann.org/epp#OK ', U ' name ': U ' Wang June xiong ', U ' dnssec ': U ' unsigned ', U ' c ity ': U ' hangzhou ', U ' expiration_date ': Datetime.datetime (2018, 7, 6, 2, 8), U ' zipcode ': U ' 311121 ', U ' domain_name ': U ' W Angjunx.top ', U ' country ': U ' CN ', U ' whois_server ': U ' http://whois.hichina.com/', U ' state ': U ' zhejiang ', U ' Registrar ': U ' Alibaba Cloud Computing Ltd. d/b/a HiChina (www.net.cn) ', U ' referral_url ': None, U ' address ': U ' Le Jia International No.9 Liang Mu Road Yuhang District ', U ' name_servers ': [u ' dns7.hichina.com ', U ' dns8.hichina.com '], u ' org ': U ' Wang June Xiong ', U ' creation_date ': Datetime.datetime (2017, 7, 6, 2, 8), U ' emails ': [u ' DomainAbuse@service.aliyun.com ', U ' 1411349759@ Qq.com ', U ' YuMing@YinSiBaoHu.AliYun.com ']}
The resulting WHOIS server returns information (class)
>>> type (data)
<class ' Whois.parser.WhoisEntry ' >
Get the corresponding keyword information
>>> data[' city ']
u ' Hangzhou '