Skip to main content

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 类型

Metadata

Release files for domainhelper 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for domainhelper 1.0.0
File Size Uploaded
domainhelper-1.0.0.tar.gz 18.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for domainhelper 1.0.0
File Interpreter ABI Platform
domainhelper-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 37.0 kB

Release files / domainhelper-1.0.0.tar.gz

Download URL domainhelper-1.0.0.tar.gz
Size 18.7 kB
Tags Source
SHA-256 checksum
How to use checksums
82904458652767fdbf6de74a912d87f50ade8452534df9dc5885a4dccadbf987
BLAKE2b-256 checksum
How to use checksums
81c0020d535524a81e6b50a217718abf15e88599db633b0d602f6bde590e5ec4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.0

Release files / domainhelper-1.0.0-py3-none-any.whl

Download URL domainhelper-1.0.0-py3-none-any.whl
Size 18.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2bd639a79b276bf4f2592c2b551803fb54a0233224e8cea7e9f1f68f28941cea
BLAKE2b-256 checksum
How to use checksums
8c0e891eb1fd3055e474fb29b90610e87cfc963d1291e201894f1bc9aec843c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.0

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page