How to extract top-level domain name (TLD) from URL
Here’s a great python module someone wrote to solve this problem after seeing this question: https://github.com/john-kurkowski/tldextract The module looks up TLDs in the Public Suffix List, mantained by Mozilla volunteers Quote: tldextract on the other hand knows what all gTLDs [Generic Top-Level Domains] and ccTLDs [Country Code Top-Level Domains] look like by looking up the … Read more