VOOZH about

URL: https://pypi.org/project/python-whois/

โ‡ฑ python-whois ยท PyPI


Skip to main content

python-whois 0.9.6

pip install python-whois

Latest release

Released:

Whois querying and parsing of domain registration information.

Navigation

Verified details

These details have been verified by PyPI
Maintainers
๐Ÿ‘ Avatar for Richard.Penman from gravatar.com
Richard.Penman

Unverified details

These details have not been verified by PyPI
Project links
Meta
  • License: MIT License (MIT)
  • Author: Richard Penman
  • Tags whois , python
Classifiers

Project description

Goal

  • Create a simple importable Python module which will produce parsed WHOIS data for a given domain.
  • Able to extract data for all the popular TLDs (com, org, net, ...)
  • Query a WHOIS server directly instead of going through an intermediate web service like many others do.

Example

>>> importwhois
>>> w = whois.whois('example.com')
>>> w.expiration_date # dates converted to datetime object
datetime.datetime(2022, 8, 13, 4, 0, tzinfo=tzoffset('UTC', 0))
>>> w.text # the content downloaded from whois server
u'\nDomain Name: EXAMPLE.COM
Registry Domain ID: 2336799_DOMAIN_COM-VRSN
...'

>>> print(w) # print values of all found attributes
{
 "creation_date": "1995-08-14 04:00:00+00:00",
 "expiration_date": "2022-08-13 04:00:00+00:00",
 "updated_date": "2021-08-14 07:01:44+00:00",
 "domain_name": "EXAMPLE.COM",
 "name_servers": [
 "A.IANA-SERVERS.NET",
 "B.IANA-SERVERS.NET"
 ],
 ...

Install

Install from pypi:

pipinstallpython-whois

Or checkout latest version from repository:

gitclonegit@github.com:richardpenman/whois.git
pipinstall-rrequirements.txt

Run test cases:

python-mpytest

Using a proxy.

Set your environment SOCKS variable

exportSOCKS="username:password@proxy_address:port"

Problems?

Pull requests are welcome!

Thanks to the many who have sent patches for additional TLDs. If you want to add or fix a TLD it's quite straightforward. See example domains in whois/parser.py

Basically each TLD has a similar format to the following:

classWhoisOrg(WhoisEntry):
"""Whois parser for .org domains
 """
 regex = {
 'domain_name': 'Domain Name: *(.+)',
 'registrar': 'Registrar: *(.+)',
 'whois_server': 'Whois Server: *(.+)',
 ...
 }

 def__init__(self, domain, text):
 if text.strip() == 'NOT FOUND':
 raise WhoisDomainNotFoundError(text)
 else:
 WhoisEntry.__init__(self, domain, text, self.regex)

Project details

Verified details

These details have been verified by PyPI
Maintainers
๐Ÿ‘ Avatar for Richard.Penman from gravatar.com
Richard.Penman

Unverified details

These details have not been verified by PyPI
Project links
Meta
  • License: MIT License (MIT)
  • Author: Richard Penman
  • Tags whois , python
Classifiers

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

python_whois-0.9.6.tar.gz (125.1 kB view details)

Uploaded Source

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

python_whois-0.9.6-py3-none-any.whl (117.0 kB view details)

Uploaded Python 3

File details

Details for the file python_whois-0.9.6.tar.gz.

File metadata

  • Download URL: python_whois-0.9.6.tar.gz
  • Upload date:
  • Size: 125.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for python_whois-0.9.6.tar.gz
Algorithm Hash digest
SHA256 2e6de7b6d70e305a85f4859cd17781ee3f0da3a02a8e94f23cb4cdcd2e400bfa
MD5 871f12f557c9aaf6ce7b994064e7aca5
BLAKE2b-256 f10c537914eca91ee5ff281309a5ca71da23c0c975cd6658668a44d3fdcf1cc4

See more details on using hashes here.

File details

Details for the file python_whois-0.9.6-py3-none-any.whl.

File metadata

  • Download URL: python_whois-0.9.6-py3-none-any.whl
  • Upload date:
  • Size: 117.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for python_whois-0.9.6-py3-none-any.whl
Algorithm Hash digest
SHA256 153261941a4d238b1278a4ca9b5b5e0590ed3b4d0c534ba111c4434d5d339410
MD5 979ce86c1489482d9f8d9bb2e7fb20ba
BLAKE2b-256 4653d0ceb3ae30da8e8ec2d9af11050178f3b4114d5aa6a7f7074199db3c806f

See more details on using hashes here.

Supported by

๐Ÿ‘ Image
AWS Cloud computing and Security Sponsor ๐Ÿ‘ Image
Datadog Monitoring ๐Ÿ‘ Image
Depot Continuous Integration ๐Ÿ‘ Image
Fastly CDN ๐Ÿ‘ Image
Google Download Analytics ๐Ÿ‘ Image
Pingdom Monitoring ๐Ÿ‘ Image
Sentry Error logging ๐Ÿ‘ Image
StatusPage Status page