Gnanesh <gnaneshku...@outlook.com> added the comment: Hey neethu,
For empty schemes, it should have a prefix of "//" in the URL to parse it correctly. Try: > urlparse('//www.cwi.nl:80') ParseResult(scheme='', netloc='www.cwi.nl:80', path='', params='', query='', fragment='') Here's a comment from the docs (https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlparse): > Following the syntax specifications in RFC 1808, urlparse recognizes a netloc > only if it is properly introduced by ‘//’. Otherwise the input is presumed to > be a relative URL and thus to start with a path component. ---------- nosy: +Gnanesh _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44375> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com