domain_parser package

Submodules

domain_parser.domain_parser module

Parses a URL using the publicsuffix.org TLD list.

domain_parser.domain_parser.get_tlds()

Return a list of top-level domains as maintained by Mozilla and publicsuffix.org.

domain_parser.domain_parser.parse_domain(url)

Return a tuple containing any subdomains, the second-level domain, and the top-level domain for a given URI.

Uses a list of active top-level domains to ensure long TLD’s such as ‘.co.uk’ are correctly treated as a single TLD. If the domain has an unrecognizable TLD, assumes it is one level.

Module contents

Table Of Contents

Previous topic

Welcome to domain_parser’s documentation!

This Page