Tldextract accurately separates the gTLD or ccTLD (generic or country code top-level domain) from the registered domain and subdomains of a URL. By default, this package supports the public ICANN TLDs and their exceptions, with optional support for the Public Suffix List's private domains as well.
This package installs the tool for Python 3.