Strip SKIP_PREFIX for SITE_ALTS only (#452)

Domain prefixes (www, mobile, m) are now striped for site alternatives only.
main
rn83 2021-10-12 04:25:21 +08:00 committed by GitHub
parent 2dd86fcf97
commit f18400b1f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -78,10 +78,9 @@ def get_site_alt(link: str) -> str:
continue continue
link = link.replace(site_key, SITE_ALTS[site_key]) link = link.replace(site_key, SITE_ALTS[site_key])
break
for prefix in SKIP_PREFIX: for prefix in SKIP_PREFIX:
link = link.replace(prefix, '//') link = link.replace(prefix, '//')
break
return link return link