tldextract

Python tool for separating TLDs

Install

All systems
curl cmd.cat/tldextract.sh
Debian Debian
apt-get install tldextract
Ubuntu
apt-get install tldextract
Arch Arch Linux
pacman -S tldextract
image/svg+xml Kali Linux
apt-get install tldextract
Fedora
dnf install tldextract
Windows (WSL2)
sudo apt-get update sudo apt-get install tldextract

tldextract

Python tool for separating TLDs

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.

python3-tldextract

Python library for separating TLDs

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 library for Python 3.

python-tldextract

Python library for separating TLDs

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 library for Python 2.