Strip SKIP_PREFIX for SITE_ALTS only

Domain prefixes (www, mobile, m) are now striped for site alternatives only.
This commit is contained in:
rn83 2021-10-03 03:25:43 +08:00 committed by GitHub
parent 002e2103ad
commit e3d0c38d1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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