Python package for retrieving WHOIS information of domains.
Project description
whois
A Python package for retrieving WHOIS information of domains.
Features
- Python wrapper for Linux "whois" command.
- Simple interface to access parsed WHOIS data for a given domain.
- Able to extract data for all the popular TLDs (com, org, net, biz, info, pl, jp, uk, nz, ...).
- Query a WHOIS server directly instead of going through an intermediate web service like many others do.
- Works with Python 3.x.
- All dates as datetime objects.
- Possibility to cache results.
- Verbose output on stderr during debugging to see how the internal functions are doing their work
- raise a exception on Quota ecceeded type responses
- raise a exception on PrivateRegistry tld's where we know the tld and know we don't know anything
- allow for optional cleaning the whois response before extracting information
- International domain name support & common Chinese domain name support
Help Wanted
Fork from: https://github.com/DannyCork/python-whois/labels/help%20wanted 基于python-whois 项目增加了对常见中文域名的支持
Usage example
Install pypywhois package from your distribution (e.g apt install pypywhois)
$pip install pypywhois
>>> import pypywhois
>>> domain = pypywhois.query('google.com')
>>> print(domain.__dict__)
{
'expiration_date': datetime.datetime(2020, 9, 14, 0, 0),
'last_updated': datetime.datetime(2011, 7, 20, 0, 0),
'registrar': 'MARKMONITOR INC.',
'name': 'google.com',
'creation_date': datetime.datetime(1997, 9, 15, 0, 0)
}
>>> print(domain.name)
google.com
>>> print(domain.expiration_date)
2020-09-14 00:00:00
>>> domain = pypywhois.get('meta.com')
>>> print(domain)
>>> domain = pypywhois.get('meta.中文网', internationalized=True)
>>> print(domain)
ccTLD & TLD support
see the file: ./whois/tld_regexpr.py or call whois.validTlds()
Issues
Raise an issue https://github.com/DannyCork/python-whois/issues/new
Changes:
2022-07-08: 新增支持的中文域名后缀
- 手机
- 信息
- 中國
- 新闻
- 移动
- 联通
- 微博
2022-07-06: 新增支持的中文域名后缀
- 中文网
- 在线
- 中国
- 娱乐
- 机构
- 组织机构
- 公司
- 集团
- 网站
- 网络
- 政府
- 游戏
- 企业
- 政务
Support
Python 3.x is supported.
Python 2.x IS NOT supported.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pypywhois-1.2.tar.gz.
File metadata
- Download URL: pypywhois-1.2.tar.gz
- Upload date:
- Size: 98.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.2.0 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c117a514c2fa4c03e8e287502be43d4b3ece19563b7aa3ba879dfe96c311bea
|
|
| MD5 |
b48a298037a0e2c89bb129456e6d17ba
|
|
| BLAKE2b-256 |
9173f1860cf43f052ef0af40099c323e6efbdcb10bb96a69ba0981601fe5128b
|
File details
Details for the file pypywhois-1.2-py2.py3-none-any.whl.
File metadata
- Download URL: pypywhois-1.2-py2.py3-none-any.whl
- Upload date:
- Size: 99.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.2.0 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abaf93fcb414063f337574d89d3887a2b8f258f22eba2eec95e83806afe45221
|
|
| MD5 |
168687f231b4a8e9a6ac21c276d1decc
|
|
| BLAKE2b-256 |
1b34eb176936f7976d9f4890d492fcc956e2aec93c9e599f2d86c6f150f0b844
|