This module extracts the top level domain (TLD) from the URL given.
A list of TLD names is taken from Mozillas public suffix list:
<https://publicsuffix.org/list/effective_tld_names.dat>
Provides
Requires
License
GPL-2.0-only OR MPL-1.1 OR LGPL-2.1-or-later
Changelog
* Tue Mar 05 2024 Steve Kowalik <steven.kowalik@suse.com>
- Update to 0.13.0:
* Drop Python 2.7, 3.5 and 3.6 support. Minimum required version now is
Python 3.7.
- Switch to autosetup and pyproject macros.
- No more greedy globs in %files.
* Mon Oct 17 2022 pgajdos@suse.com
- python-six is not required
* Sun Jun 20 2021 Sebastian Wagner <sebix+novell.com@sebix.at>
- update to version 0.12.6:
- Move Registry class from tld.registry to tld.base.
- Reformat code using black.
- Log information on updated resources of the update_tld_names.
* Wed May 19 2021 Sebastian Wagner <sebix+novell.com@sebix.at>
- Update to version 0.12.5:
Release dedicated to defenders of Armenia and Artsakh (Nagorno Karabakh)
and all the victims of Turkish and Azerbaijani aggression.
- Fixed lower-cased `parsed_url` attributes (`SplitResult`) when getting
tld as object (`as_object=True`).
- Update to version 0.12.4:
- Tested against Python 3.9.
* Sun Dec 20 2020 Sebastian Wagner <sebix+novell.com@sebix.at>
- Update to version 0.12.3:
- Separate parsers for (a) public and private and (b) public only domains. This
fixes a bug. If you want an old behaviour:
The following code would raise exception in past.
.. code-block:: python
from tld import get_tld
get_tld(
'http://silly.cc.ua',
search_private=False
)
Now it would return `ua`.
.. code-block:: python
get_tld(
'http://silly.cc.ua',
search_private=False
)
If you want old behavior, do as follows:
.. code-block:: python
from tld.utils import MozillaTLDSourceParser
get_tld(
'http://silly.cc.ua',
search_private=False,
parser_class=MozillaTLDSourceParser
)
Same goes for ``get_fld``, ``process_url``, ``parse_tld`` and ``is_tld``
functions.
* Thu May 21 2020 Sebastian Wagner <sebix+novell.com@sebix.at>
- Update to version 0.12.2:
- Add mozilla license to dist.
- Fix MyPy issues.
* Mon May 18 2020 Petr Gajdos <pgajdos@suse.com>
- %python3_only -> %python_alternative
* Sun May 03 2020 Sebastian Wagner <sebix+novell.com@sebix.at>
- update to version 0.12.1:
- Correctly handling domain names ending with dot(s).
* Wed Apr 22 2020 Sebastian Wagner <sebix+novell.com@sebix.at>
- update to version 0.12:
- Use Public Suffix list instead of deprecated Mozilla's MXR.
* Thu Mar 26 2020 pgajdos@suse.com
- version update to 0.11.11
* - Minor speed-ups, reduce memory usage.
Files
/etc/alternatives/update-tld-names
/usr/bin/update-tld-names
/usr/bin/update-tld-names-3.12
/usr/lib/python3.12/site-packages/tld
/usr/lib/python3.12/site-packages/tld-0.13.dist-info
/usr/lib/python3.12/site-packages/tld-0.13.dist-info/INSTALLER
/usr/lib/python3.12/site-packages/tld-0.13.dist-info/LICENSE_LGPL_2.1.txt
/usr/lib/python3.12/site-packages/tld-0.13.dist-info/METADATA
/usr/lib/python3.12/site-packages/tld-0.13.dist-info/RECORD
/usr/lib/python3.12/site-packages/tld-0.13.dist-info/REQUESTED
/usr/lib/python3.12/site-packages/tld-0.13.dist-info/WHEEL
/usr/lib/python3.12/site-packages/tld-0.13.dist-info/entry_points.txt
/usr/lib/python3.12/site-packages/tld-0.13.dist-info/top_level.txt
/usr/lib/python3.12/site-packages/tld/__init__.py
/usr/lib/python3.12/site-packages/tld/__pycache__
/usr/lib/python3.12/site-packages/tld/__pycache__/__init__.cpython-312.opt-1.pyc
/usr/lib/python3.12/site-packages/tld/__pycache__/__init__.cpython-312.pyc
/usr/lib/python3.12/site-packages/tld/__pycache__/base.cpython-312.opt-1.pyc
/usr/lib/python3.12/site-packages/tld/__pycache__/base.cpython-312.pyc
/usr/lib/python3.12/site-packages/tld/__pycache__/conf.cpython-312.opt-1.pyc
/usr/lib/python3.12/site-packages/tld/__pycache__/conf.cpython-312.pyc
/usr/lib/python3.12/site-packages/tld/__pycache__/defaults.cpython-312.opt-1.pyc
/usr/lib/python3.12/site-packages/tld/__pycache__/defaults.cpython-312.pyc
/usr/lib/python3.12/site-packages/tld/__pycache__/exceptions.cpython-312.opt-1.pyc
/usr/lib/python3.12/site-packages/tld/__pycache__/exceptions.cpython-312.pyc
/usr/lib/python3.12/site-packages/tld/__pycache__/helpers.cpython-312.opt-1.pyc
/usr/lib/python3.12/site-packages/tld/__pycache__/helpers.cpython-312.pyc
/u