高效码农

Python利器:检索域名WHOIS信息的Python软件包

简介

用于检索域名WHOIS信息的Python软件包:Whois 当前版本:0.9.7

模块功能

使用

1、安装

pip install whois
# or
pip3 install whois

2、简单举例:

import whois
import pprint

domain = whois.query('xugj520.cn')
pprint.pprint(domain.__dict__)
print('name: ' + domain.name)

输出:

{'creation_date': datetime.datetime(2019, 3, 5, 22, 27, 20),
 'expiration_date': datetime.datetime(2022, 3, 5, 22, 27, 20),
 'last_updated': None,
 'name': 'xugj520.cn',
 'name_servers': {'f1g1ns2.dnspod.net', 'f1g1ns1.dnspod.net'},
 'registrar': '北京新网数码信息技术有限公司',
 'status': 'ok'}
name: xugj520.cn

ccTLD & TLD 支持

ccTLD - uz - ac.uk - ar - at - be - br - ca - co - co.jp - cl - cn - cz - de - eu - fr - it - ir - jp - kr - lv - lt - mx - nz - pl - ru - uk - us - mx - br - sh - id - tv - cc - nyc - pw - рф (xn–p1ai) - in

TLD - download - biz - edu - education - com - download - info - me - mobi - name - net - ninja - nyc - online - org - io - xyz - tel - online - wiki - press - pharmacy - rest - security - site - space - store - tech - tel - theatre - tickets - video - website - club

当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »