|
发表于 2020-1-15 14:31:26
|
显示全部楼层
用法:
- Help on package whois:
- NAME
- whois - Python module/library for retrieving WHOIS information of domains.
- DESCRIPTION
- By DDarko.org ddarko@ddarko.org http://ddarko.org/
- License MIT http://www.opensource.org/licenses/mit-license.php
-
- Usage example
- >>> import whois
- >>> domain = whois.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
- PACKAGE CONTENTS
- _1_query
- _2_parse
- _3_adjust
- exceptions
- tld_regexpr
- FUNCTIONS
- query(domain, force=0, cache_file=None, slow_down=0, ignore_returncode=0)
- force=1 <bool> Don't use cache.
- cache_file=<path> <str> Use file to store cache not only memory.
- slow_down=0 <int> Time [s] it will wait after you query WHOIS database. This is useful when there is a limit to the number of requests at a time.
- DATA
- CACHE_FILE = None
- SLOW_DOWN = 0
- TLD_RE = {'at': {'creation_date': re.compile('Creation Date:\\s?(.+)',...
复制代码
善用 help |
|