Don't prepend to services that have schemes with '//' (#925)

main
Charles Zawacki 2023-01-04 12:10:32 -05:00 committed by GitHub
parent 2827a4ef47
commit cec10e81d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -171,6 +171,9 @@ def get_site_alt(link: str) -> str:
link = '//'.join(link.split('//')[1:]) link = '//'.join(link.split('//')[1:])
for prefix in SKIP_PREFIX: for prefix in SKIP_PREFIX:
if parsed_alt.scheme:
link = link.replace(prefix, '')
else:
link = link.replace(prefix, '//') link = link.replace(prefix, '//')
break break