mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-04 07:00:23 +00:00
Don't strip the URL fragment from cache key if using AnchorCheck
Else once one URL for a page has been checked, URLs with different
fragments are skipped and not passed to AnchorCheck.
eaa538c ("don't check one url multiple times", 2016-11-09)
This commit is contained in:
parent
a7eacd6200
commit
0912e8a2c1
1 changed files with 7 additions and 5 deletions
|
|
@ -363,11 +363,13 @@ class UrlBase:
|
||||||
|
|
||||||
def set_cache_url(self):
|
def set_cache_url(self):
|
||||||
"""Set the URL to be used for caching."""
|
"""Set the URL to be used for caching."""
|
||||||
# remove anchor from cached target url since we assume
|
if "AnchorCheck" in self.aggregate.config["enabledplugins"]:
|
||||||
# URLs with different anchors to have the same content
|
self.cache_url = self.url
|
||||||
self.cache_url = urlutil.urlunsplit(self.urlparts[:4] + [''])
|
else:
|
||||||
if self.cache_url is not None:
|
# remove anchor from cached target url since we assume
|
||||||
assert isinstance(self.cache_url, str), repr(self.cache_url)
|
# URLs with different anchors to have the same content
|
||||||
|
self.cache_url = urlutil.urlunsplit(self.urlparts[:4] + [''])
|
||||||
|
log.debug(LOG_CHECK, "cache_url '%s'", self.cache_url)
|
||||||
|
|
||||||
def check_syntax(self):
|
def check_syntax(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue