From f18400b1f1369ad1e846162e4f9ceb2f979862ec Mon Sep 17 00:00:00 2001 From: rn83 <55765083+rn83@users.noreply.github.com> Date: Tue, 12 Oct 2021 04:25:21 +0800 Subject: [PATCH] Strip SKIP_PREFIX for SITE_ALTS only (#452) Domain prefixes (www, mobile, m) are now striped for site alternatives only. --- app/utils/results.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/utils/results.py b/app/utils/results.py index 7db53ed..5a06855 100644 --- a/app/utils/results.py +++ b/app/utils/results.py @@ -78,11 +78,10 @@ def get_site_alt(link: str) -> str: continue link = link.replace(site_key, SITE_ALTS[site_key]) + for prefix in SKIP_PREFIX: + link = link.replace(prefix, '//') break - for prefix in SKIP_PREFIX: - link = link.replace(prefix, '//') - return link