diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 4d31763..d728d4a 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.6.0 +current_version = 1.7.1 commit = True tag = True message = Version {new_version} diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 673744c..c4e4608 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,15 @@ Changelog ~~~~~~~~~ - N/A +- 1.7.1 (2022-10-25) + - fixes urlextract without authority causes AttributeError + +- 1.7.0 (2022-10-22) + - correct handling when authority starts with @ symbol + - remove unreserved characters from the beginning of found URL + - added typing and mypy checkcs - by mimi89999 + - updated list of TLDs + - 1.6.0 (2022-05-17) - Add a list of URLs allowed to extract (issue #125) - by khoben - correct order of actual and expected in tests diff --git a/setup.py b/setup.py index b24ad97..6d83d43 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ # version of URLExtract # (do not forget to change it in urlextract_core.py as well) -__version__ = "1.6.0" +__version__ = "1.7.1" def read(readme): diff --git a/tests/unit/test_find_urls.py b/tests/unit/test_find_urls.py index 783ca0c..90250e6 100644 --- a/tests/unit/test_find_urls.py +++ b/tests/unit/test_find_urls.py @@ -58,6 +58,7 @@ ["www.example.com/somejsfile.js"], ), ("bad.email @address.net>", ['bad.email']), + ('[[ "$(giturl)" =~ ^https://gitlab.com ]] echo "found" || echo "didnt', []), ], ) def test_find_urls(urlextract, text, expected): diff --git a/urlextract/data/tlds-alpha-by-domain.txt b/urlextract/data/tlds-alpha-by-domain.txt index 62d511f..7c2497a 100644 --- a/urlextract/data/tlds-alpha-by-domain.txt +++ b/urlextract/data/tlds-alpha-by-domain.txt @@ -1,4 +1,4 @@ -# Version 2022051700, Last Updated Tue May 17 07:07:01 2022 UTC +# Version 2022102200, Last Updated Sat Oct 22 07:07:01 2022 UTC AAA AARP ABARTH @@ -176,7 +176,6 @@ BROTHER BRUSSELS BS BT -BUGATTI BUILD BUILDERS BUSINESS @@ -196,7 +195,6 @@ CALVINKLEIN CAM CAMERA CAMP -CANCERRESEARCH CANON CAPETOWN CAPITAL diff --git a/urlextract/urlextract_core.py b/urlextract/urlextract_core.py index dec043c..b6b3767 100644 --- a/urlextract/urlextract_core.py +++ b/urlextract/urlextract_core.py @@ -25,7 +25,7 @@ from urlextract.cachefile import CacheFile, CacheFileError # version of URLExtract (do not forget to change it in setup.py as well) -__version__ = "1.6.0" +__version__ = "1.7.1" # default value for maximum count of processed URLs by find_url DEFAULT_LIMIT = 10000 @@ -578,7 +578,7 @@ def _is_domain_valid( # :///?# # authority can't start with @ - if url_parts.authority.startswith('@'): + if url_parts.authority and url_parts.authority.startswith('@'): return False # if URI contains user info and schema was automatically added