免費Whois查詢接口,徹底開放python
頁面: http://whois.tt80.xingit
Api: http://whois.tt80.xin/whoisapi?domain_name=docker
{ "code": "1", "data": { "DomainName": "TT80.XIN ", "RegistryDomainID": "D417300000001380250-ACRS ", "RegistrarWhoisServer": null, "RegistrarUrl": "www.net.cn ", "UpdatedDate": "2018-06-10T12:23:28Z ", "CreationDate": "2017-06-09T04:28:11Z ", "RegistryExpiryDate": "2019-06-09T04:28:11Z ", "Registrar": "Alibaba Cloud Computing Ltd. d/b/a HiChina (www.net.cn) ", "RegistrarIanaId": "1599 ", "RegistrarAbuseContactEmail": null, "RegistrarAbuseContactPhone": null, "DomainStatus": [ "ok https://icann.org/epp#ok " ], "NameServer": [ "DNS23.HICHINA.COM ", "DNS24.HICHINA.COM " ] } }
狀態碼: 1) 1 域名信息獲取成功 2) 0 域名不存在 3) -1 暫不支持此域名查詢 4) -2 域名輸入有誤 5) -3 域名查詢失敗 6) -4 服務器異常
1、直接運行主程序文件啓動服務api
直接運行main.py文件,須要python 3.5+版本服務器
一、 安裝依賴包dom
python3 -m pip install -r requirements.txt
二、運行服務端程序測試
python3 main.py
運行時能夠指定的參數
`port`: 指定程序運行的端口
2、使用Docker運行服務端ui
docker run -itd --name=whois-query -p 8080:8080 registry.cn-beijing.aliyuncs.com/musker/whois-query