From cec10e81d35b9daef7fd964712a9f9b5f30d77eb Mon Sep 17 00:00:00 2001 From: Charles Zawacki <44577941+cazwacki@users.noreply.github.com> Date: Wed, 4 Jan 2023 12:10:32 -0500 Subject: [PATCH] Don't prepend to services that have schemes with '//' (#925) --- app/utils/results.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/utils/results.py b/app/utils/results.py index 5604a4e..cd4392d 100644 --- a/app/utils/results.py +++ b/app/utils/results.py @@ -171,7 +171,10 @@ def get_site_alt(link: str) -> str: link = '//'.join(link.split('//')[1:]) for prefix in SKIP_PREFIX: - link = link.replace(prefix, '//') + if parsed_alt.scheme: + link = link.replace(prefix, '') + else: + link = link.replace(prefix, '//') break return link