whois:网站的所有者

xiaohai 2021-05-05 21:40:59 1073人围观 标签: Python 
简介whois:网站的所有者

1、首先通过pip安装python-whois

[root@localhost ~]# pip install python-whois

2、查询返回结果

[root@localhost ~]# python
Python 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import whois
>>> print(whois.whois("hi917.com"))
{
  "domain_name": [
    "HI917.COM",
    "hi917.com"
  ],
  "registrar": "HiChina Zhicheng Technology Ltd.",
  "whois_server": "grs-whois.hichina.com",
  "referral_url": null,
  "updated_date": "2018-05-11 01:33:05",
  "creation_date": "2018-05-09 05:00:43",
  "expiration_date": "2019-05-09 05:00:43",
  "name_servers": [
    "DNS17.HICHINA.COM",
    "DNS18.HICHINA.COM"
  ],
  "status": "ok https://icann.org/epp#ok",
  "emails": "DomainAbuse@service.aliyun.com",
  "dnssec": "unsigned",
  "name": null,
  "org": null,
  "address": null,
  "city": "Cheng Du Shi",
  "state": "Si Chuan",
  "zipcode": null,
  "country": null
}
>>>