Moro, Andrea via Python-list wrote: > Hello there, > > I believe there is a bug in the urljoin library.
I believe this is a case of garbage-in garbage-out ;) Try p = urlparse(url) if not p.scheme: url = urlunparse(p._replace(scheme="http")) > > See below: > > p = urlparse(url) > if p.scheme == '': > url = urljoin('http://', url) > > > Input: > domain.tld/somepath > > Output > http:///domain.tld/somepath > > p = urlparse(url) > if p.scheme == '': > url = urljoin('http:', url) > > Input: > domain.tld/somepath > > Output > http:///domain.tld/somepath > -- https://mail.python.org/mailman/listinfo/python-list