tld

Extracts the top level domain (TLD) from the URL given.

OTHER License

Downloads
3.2M
Stars
177
Committers
16
tld - 0.13 Latest Release

Published by barseghyanartur over 1 year ago

  • Drop Python 2.7, 3.5 and 3.6 support. Minimum required version now is Python 3.7.
tld - 0.12.7-2023-02-02

Published by barseghyanartur over 1 year ago

  • Make sure to fail silently on bad URL patterns.
  • Tested against Python 3.11.
  • Tested against Python 3.10.
  • Updated bundled tld names.
tld - 0.12.6-2021-06-05

Published by barseghyanartur over 3 years ago

  • Move Registry class from tld.registry to tld.base.
  • Reformat code using black.
  • Log information on updated resources of the update_tld_names.
tld - 0.12.5-2021-01-11

Published by barseghyanartur almost 4 years ago

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).
tld - 0.12.4-2021-01-02

Published by barseghyanartur almost 4 years ago

  • Tested against Python 3.9.
tld - 0.12.3-2020-11-26

Published by barseghyanartur almost 4 years ago

  • 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.

    
      from tld import get_tld
    
      get_tld(
          'http://silly.cc.ua',
          search_private=False
      )
    

    Now it would return ua.

    
      get_tld(
          'http://silly.cc.ua',
          search_private=False
      )
    

    If you want old behavior, do as follows:

    
      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.

tld - 0.12.2-2020-05-20

Published by barseghyanartur over 4 years ago

  • Add Mozilla license to dist.
  • Fix MyPy issues.
tld - 0.12.1-2020-04-25

Published by barseghyanartur over 4 years ago

.. note::

In commemoration of `Armenian Genocide <https://en.wikipedia.org/wiki/Armenian_Genocide>`_.
  • Correctly handling domain names ending with dot(s).
tld - 0.12-2020-04-19

Published by barseghyanartur over 4 years ago

  • Use Public Suffix list instead of deprecated Mozilla's MXR.
tld - 0.11.11-2020-03-10

Published by barseghyanartur over 4 years ago

  • Minor speed-ups, reduce memory usage.
tld - 0.11.10-2020-02-05

Published by barseghyanartur over 4 years ago

  • Python 2.7 and 3.5 fixes.
tld - 0.11.9-2019-12-26

Published by barseghyanartur over 4 years ago

  • Adding test TLDs list to the package.
tld - 0.11.8-2019-12-13

Published by barseghyanartur almost 5 years ago

  • Minor fixes in setup.py and manifest. Include missing resources for python 2.7 dist.
tld - 0.11.7-2019-12-13

Published by barseghyanartur almost 5 years ago

.. note::

There have been no code changes since 0.11.2. The only change is that
support for Python 2.7 and 3.5 has been added.
  • Added support for Python 2.7.
tld - 0.11.6-2019-12-12

Published by barseghyanartur almost 5 years ago

  • Targeted releases for all supported Python versions.
tld - 0.11.1-2019-12-11

Published by barseghyanartur almost 5 years ago

  • Minor speed ups.
  • More on adding typing.
tld - 0.11-2019-12-09

Published by barseghyanartur almost 5 years ago

.. note::

Since introduction of parser classes, usage of
``NAMES_SOURCE_URL`` and ``NAMES_LOCAL_PATH`` of the ``tld.conf``
module is deprecated. Also, ``tld_names_local_path``
and ``tld_names_source_url`` arguments are deprecated as well.
If you want to customise things, implement your own parser (inherit from
``BaseTLDSourceParser``).
  • Drop support for Python versions prior to 3.6.
  • Clean-up dependencies.
  • Introduce parsers.
  • Drop tld_names_source_url and tld_names_local_path introduced
    in the previous release.
  • Minor speed-ups (including tests).
tld - 0.10-2019-11-27

Published by barseghyanartur almost 5 years ago

.. note::

This is the last release which supports Python 2.
  • Make it possible to provide a custom path to the TLD names file.
  • Make it possible to free up some resources occupied due to loading custom
    tld names by calling the reset_tld_names function
    with tld_names_local_path parameter.
tld - 0.9.8-2019-11-15

Published by barseghyanartur almost 5 years ago

  • Fix for occasional issue when some domains are not correctly recognised.
tld - 0.9.7-2019-11-15

Published by barseghyanartur almost 5 years ago

.. note::

This release is dedicated to my newborn daughter. Happy birthday, my dear
Ani.
  • Handling urls that are only a TLD.
  • Accepts already splitted URLs.
  • Tested against Python 3.8.