url_extract (pypi): extracts tld, domain, subdomains and query from URLs. It also validates the URLs.
Keywords: domain|tld|extract