mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-17 06:20:27 +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):
|
||||
"""Set the URL to be used for caching."""
|
||||
# remove anchor from cached target url since we assume
|
||||
# URLs with different anchors to have the same content
|
||||
self.cache_url = urlutil.urlunsplit(self.urlparts[:4] + [''])
|
||||
if self.cache_url is not None:
|
||||
assert isinstance(self.cache_url, str), repr(self.cache_url)
|
||||
if "AnchorCheck" in self.aggregate.config["enabledplugins"]:
|
||||
self.cache_url = self.url
|
||||
else:
|
||||
# remove anchor from cached target url since we assume
|
||||
# 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):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue