barseghyanartur / tld

Extracts the top level domain (TLD) from the URL given.
https://pypi.python.org/pypi/tld
Other
179 stars 36 forks source link

Invalid TLD #118

Closed osagit closed 2 years ago

osagit commented 2 years ago

Amazon domains such as :

gives a bad TLD from tld lib (tld.get_tld(domain, as_object=True, fail_silently=False, fix_protocol=True))

tld : us-east-1.amazonaws.com

boogheta commented 2 years ago

Hello, Why would you think this is a bad TLD? It is an official TLD registered and listed in the official public suffix list maintained by Mozilla: https://publicsuffix.org/list/public_suffix_list.dat You can read more about TLDs here: https://publicsuffix.org/

osagit commented 2 years ago

Hello, Ok, thanks for the links and the quick reply.

There is a difference between TLD and public suffix: here the list of official ICANN TLDs: https://data.iana.org/TLD/tlds-alpha-by-domain.txt

There is no mention of us-east-1.amazonaws.com which is indeed a public suffix, not a TLD