About Anaconda Help Download Anaconda

Accurately separate the TLD from the registered domain andsubdomains of a URL, using the Public Suffix List.

Installers

  • linux-64 v5.1.2
  • linux-aarch64 v5.1.2
  • linux-s390x v5.1.2
  • osx-64 v5.1.2
  • osx-arm64 v5.1.2
  • win-64 v5.1.2
  • noarch v3.2.0

conda install

To install this package run one of the following:
conda install anaconda::tldextract

Description

tldextract accurately separates a URL's subdomain, domain, and public suffix, using the Public Suffix List (PSL). Say you want just the "google" part of https://www.google.com. Everybody gets this wrong. Splitting on the "." and taking the 2nd-to-last element only works for simple domains, e.g. .com. Consider http://forums.bbc.co.uk: the naive splitting method will give you "co" as the domain, instead of "bbc". Rather than juggle TLDs, gTLDs, or ccTLDs yourself, tldextract extracts the currently living public suffixes according to the Public Suffix List. A public suffix is also sometimes called an effective TLD (eTLD).


© 2024 Anaconda, Inc. All Rights Reserved. (v4.0.6) Legal | Privacy Policy