removed duplicate line

This commit is contained in:
matthias@arch 2022-12-02 13:42:07 +01:00
parent 8dedf0f4b9
commit ba7cd1c22b

View File

@ -312,7 +312,7 @@ def cleanup_referer(referer: str) -> str:
""" """
m = fullmatch(re_uri_full, referer) m = fullmatch(re_uri_full, referer)
if not m: if not m:
pdebug(f"cleanup_referer: Could not match referer '{referer}'") warning(f"cleanup_referer: Could not match referer '{referer}'")
return referer return referer
# pdebug(f"cleanup_referer: {referer} - {m.groups()}") # pdebug(f"cleanup_referer: {referer} - {m.groups()}")
protocol = m.groups()[0] protocol = m.groups()[0]
@ -326,7 +326,6 @@ def cleanup_referer(referer: str) -> str:
if len(domain.split(".")) == 2: # if domain.tld if len(domain.split(".")) == 2: # if domain.tld
referer = domain.split(".")[0] referer = domain.split(".")[0]
if not settings["referer_ranking_ignore_subdomain"]: referer = subdomains + referer if not settings["referer_ranking_ignore_subdomain"]: referer = subdomains + referer
if not settings["referer_ranking_ignore_subdomain"]: referer = subdomains + referer
if not settings["referer_ranking_ignore_protocol"]: referer = protocol + "://" + referer if not settings["referer_ranking_ignore_protocol"]: referer = protocol + "://" + referer
if not settings["referer_ranking_ignore_location"]: referer += location if not settings["referer_ranking_ignore_location"]: referer += location
# pdebug(f"cleanup_referer: cleaned up: {referer}") # pdebug(f"cleanup_referer: cleaned up: {referer}")