Gnanesh 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:/
New submission from Neethu :
urllib.parse.urlparse is not parsing urls without scheme and with port number
properly.
from urllib.parse import urlparse
print(urlparse("www.cwi.nl:80"))
ParseResult(scheme='www.cwi.nl', netloc='', path='80', params='', query='',
fragment='')
Python version : 3