WhoisLite is a fast, pure Python library for querying WHOIS information for domain names across hundreds of TLDs.
pip install whoislitefrom whoislite.utils import WhoisLite
domain = "google.com"
w = WhoisLite(domain)
w.lookup()
w.print_summary()
print(w.to_json())