dev-python/
tldextract

Accurately separate the TLD from the registered domain and subdomains of a URL.

https://pypi.org/project/tldextract/