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

简介

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

模块功能

  • 适用于Linux “whois” 命令的Python包装器
  • 用于返回给定域的已解析WHOIS数据
  • 能够提取所有流行的TLD(com,org,net,biz,info,pl,jp,uk,nz等)的数据
  • 直接查询WHOIS服务器,而不像其他许多工具一样通过中间Web服务
  • 适用于Python 2.4+和Python 3.x
  • 所有日期作为日期时间对象
  • 可以缓存结果
  • 使用

    1、安装

    pip install whois# orpip3 install whois

    2、简单举例:

    import whoisimport pprintdomain = 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 - рф (xnp1ai) - inTLD - 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

    声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

    上一篇 2021年1月5日
    下一篇 2021年1月5日

    相关推荐