Extracts the top level domain (TLD) from the URL given.
OTHER License
Published by barseghyanartur about 5 years ago
Published by barseghyanartur about 5 years ago
Published by barseghyanartur about 5 years ago
Published by barseghyanartur over 5 years ago
Published by barseghyanartur almost 6 years ago
Published by barseghyanartur over 6 years ago
Published by barseghyanartur over 6 years ago
This release contains backward incompatible changes. You should update
your code.
The ``active_only`` option has been removed from ``get_tld``, ``get_fld``
and ``parse_url`` functions. Update your code accordingly.
active_only
option from get_tld
, get_fld
parse_url
functions.parse_tld
function.Published by barseghyanartur over 6 years ago
This release contains backward incompatible changes. You should update
your code.
Old ``get_tld`` functionality remain is moved to ``get_fld`` (first-level
domain definition). The ``as_object`` argument (False by default) has been
deprecated for ``get_fld``.
res = get_tld("http://www.google.co.uk", as_object=True)
**Old behaviour**
In: res.domain
Out: 'google'
In: res.extension
Out: 'co.uk'
In: res.subdomain
Out: 'www'
In: res.suffix
Out: 'co.uk'
In: res.tld
Out: 'google.co.uk'
**New behaviour**
In: res.fld
Out: 'google.co.uk'
In: res.tld
Out: 'co.uk'
In: res.domain
Out: 'google'
In: res.subdomain
Out: 'www'
When used without ``as_object`` it returns ``co.uk``.
**Recap**
If you have been happily using old version of ``get_tld`` function without
``as_object`` argument set to ``True``, you might want to replace ``get_tld``
import with ``get_fld`` import:
# Old
from tld import get_tld
get_tld('http://google.co.uk')
# New
from tld import get_fld
get_fld('http://google.co.uk')
search_public
and search_private
arguments accordingly.*****.xn--fiqs8s
are now recognized as well.urlsplit
instead of urlparse
, the initial list of TLDsPublished by barseghyanartur over 6 years ago
fix_protocol
argument respects protocol relative URLs.Published by barseghyanartur over 6 years ago
python setup.py test
can used to execute the tests.Published by barseghyanartur over 7 years ago
get_tld
got a new argument fix_protocol
, which fixes the missingPublished by barseghyanartur over 7 years ago
tld.update
module. Use update-tld-names
commandPublished by barseghyanartur over 7 years ago
Published by barseghyanartur over 7 years ago
Published by barseghyanartur about 9 years ago
get_tld_names
.Published by barseghyanartur over 9 years ago
Published by barseghyanartur over 9 years ago
Published by barseghyanartur over 9 years ago
Published by barseghyanartur over 9 years ago
as_object
argument of get_tld
function to True.Published by barseghyanartur over 9 years ago
six
package version requirement to