@@ -7,9 +7,13 @@ Say you want just the "google" part of https://www.google.com. *Everybody gets
77this wrong.* Splitting on the "." and taking the 2nd-to-last element only works
88for simple domains, e.g. .com. Consider
99[ http://forums.bbc.co.uk ] ( http://forums.bbc.co.uk ) : the naive splitting method
10- will give you "co" as the domain, instead of "bbc". Rather than juggle TLDs,
11- gTLDs, or ccTLDs yourself, ` tldextract ` extracts the currently living public
10+ will give you "co" as the domain, instead of "bbc".
11+
12+ Rather than juggle TLDs,
13+ gTLDs, ccTLDs, and their exceptions yourself, ` tldextract ` extracts the currently living public
1214suffixes according to [ the Public Suffix List] ( https://publicsuffix.org ) .
15+ You can optionally support the Public Suffix List's [ private
16+ domains] ( #public-vs-private-domains ) as well.
1317
1418> A "public suffix" is one under which Internet users can directly register
1519> names.
@@ -63,16 +67,6 @@ $ tldextract 'http://forums.bbc.co.uk'
6367forums bbc co.uk
6468```
6569
66- By default, this package supports the public ICANN TLDs and their exceptions.
67- You can optionally support the Public Suffix List's [ private
68- domains] ( #public-vs-private-domains ) as well.
69-
70- This package started by implementing the chosen answer from [ this StackOverflow question on
71- getting the "domain name" from a URL] ( http://stackoverflow.com/questions/569137/how-to-get-domain-name-from-url/569219#569219 ) .
72- However, the proposed regex solution doesn't address many country codes like
73- com.au, or the exceptions to country codes like the registered domain
74- parliament.uk. The Public Suffix List does, and so does this package.
75-
7670## Install
7771
7872Latest release on PyPI:
@@ -284,3 +278,11 @@ Automatically format all code:
284278``` zsh
285279ruff format .
286280```
281+
282+ ## History
283+
284+ This package started by implementing the chosen answer from [ this StackOverflow question on
285+ getting the "domain name" from a URL] ( http://stackoverflow.com/questions/569137/how-to-get-domain-name-from-url/569219#569219 ) .
286+ However, the proposed regex solution doesn't address many country codes like
287+ com.au, or the exceptions to country codes like the registered domain
288+ parliament.uk. The Public Suffix List does, and so does this package.
0 commit comments