Python Network Processing: Get Domain Whois Information Using Python-Whois

In this tutorial, we will introduce how to get domain whois information using python python-whois library.

Python Network Processing - Get Domain Whois Information Using Python-Whois - A Step Guide

1.Install python-whois

pip install python-whois

2.Import library

import whois

domain='www.cocyer.com'

3.Get domain information

domain_info = whois.whois(domain)

4.Display all domain information

for key, value in domain_info.items():
    print(key,':', value)

Run this code, you may see this information:

Python Network Processing: Get Domain Whois Information Using Python-Whois