Better normalization of feeds with feed:// in the protocol.

This commit is contained in:
Samuel Clay 2021-07-05 12:54:23 -04:00
parent cb1f168812
commit 8d11cd68f1

View file

@ -111,7 +111,15 @@ def normalize(url):
if '://' not in url:
url = 'http://' + url
if url.startswith('feed://'):
url = url.replace('feed://', 'http://')
if 'http://' in url or 'https://' in url:
url = url.replace('feed:', '')
else:
url = url.replace('feed://', 'http://')
if url.startswith('feed:'):
if 'http://' in url or 'https://' in url:
url = url.replace('feed:', '')
else:
url = url.replace('feed:', 'http://')
return url