I want to extract the domain name(name of the site+TLD) from a list of URLs which may vary in their format. for instance: Current state---->what I want
mai
There is a public list of TLD and CC TLD that is maintained.
This python project reads this list and compares your URL against this list.
https://github.com/john-kurkowski/tldextract