Skip to main content

verify the domain and operate it

Project description

domainhelper -- 域名助手

支持 python2,python3

功能:

  1. verify_domain(domain)
    验证域名是否正确

    in:  verify_domain('a.b.c.www.baidu.com.cn')
    out: True
    
  2. get_domain_suffix(domain)
    获取域名后缀
    示例:

    in:  get_domain_suffix('a.b.c.www.baidu.com.cn')
    out: '.com.cn'
    
  3. get_top_domain(domain)
    获取顶级域名
    示例:

    in:  get_top_domain('a.b.c.www.baidu.com.cn') 
    out: 'baidu.com.cn'
    
  4. get_multi_domain(domain)
    获取次级域名
    示例:

    in:  get_multi_domain('a.b.c.www.baidu.com.cn')
    out: ['baidu.com.cn', 'www.baidu.com.cn', 'c.www.baidu.com.cn', 'b.c.www.baidu.com.cn', 'a.b.c.www.baidu.com.cn']
    

注意: 参数domain 必须是 str 类型

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for domainhelper, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size domainhelper-1.0.0-py3-none-any.whl (18.3 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size domainhelper-1.0.0.tar.gz (18.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page