It took some work, but it's finally done: pythonwhois 2.0.0!
pythonwhois is, simply put, a WTFPL-licensed library for retrieving and parsing WHOIS data for a domain. It'll give you all the data in a nice, consistent, structured format - instead of the giant inconsistent mess that WHOIS responses normally are.
New in version 2.0.0:
- pythonwhois can now parse registrant/contact data! All registrant and tech/admin/billing contact data is supported.
- No more jwhois dependency! In fact, pythonwhois now has no dependencies at all aside from the Python standard library.
- A commandline tool is now included. 'pwhois' will let you make WHOIS queries from a terminal, much like 'whois' and 'jwhois' - except pwhois will give you nicely formatted human-readable data! Here's an example.
- pythonwhois can now 'normalize' data. No more all-uppercase or all-lowercase WHOIS data! It will try to intelligently fix capitalization and some other stuff, so that you get consistent human-readable output. Of course this functionality is optional!
- Retrieval and parsing have been separated. You can now just use half of the library, and let another application do the rest!
- A testing harness has been added. This script will detect any unintended changes in WHOIS output, so that you can safely work on the parser without breaking things that worked before!
- Documentation! There's now full usage documentation (it's also included in the repository, and uses ZippyDoc).
- The parser has been improved to support many many more registries and registrar servers. Bug reports welcome!
To install it, just run pip install pythonwhois
! Documentation can be found here.
If you want to upgrade from the previous version, you can run pip install --upgrade pythonwhois
- however, the API has changed and your code will likely break. There's more information about that here.
*Update (17:13): *Looks like I botched the get_whois() method in the 2.0.0 release. A 2.0.1 version has been released that rectifies this issue, and is available from PyPi. It should now work as documented.