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