diff --git a/manifest_xml.py b/manifest_xml.py index 8b57bf52..cfbd9efa 100644 --- a/manifest_xml.py +++ b/manifest_xml.py @@ -90,7 +90,8 @@ class _XmlRemote(object): # and then replacing it with the original when we are done. if manifestUrl.find(':') != manifestUrl.find('/') - 1: - url = urllib.parse.urljoin('gopher://' + manifestUrl, url)[9:] + url = urllib.parse.urljoin('gopher://' + manifestUrl, url) + url = re.sub(r'^gopher://', '', url) else: url = urllib.parse.urljoin(manifestUrl, url) return url