When using Python urlparse
on this URL i get this error
urlparse("https://a:=?@1.2.3.4:123").port
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-95-4f5e20527e52> in <module>
----> 1 urlparse("https://a:=?@1.2.3.4:123").port
~/.pyenv/versions/3.7.8/lib/python3.7/urllib/parse.py in port(self)
167 port = self._hostinfo[1]
168 if port is not None:
--> 169 port = int(port, 10)
170 if not ( 0 <= port <= 65535):
171 raise ValueError("Port out of range 0-65535")
ValueError: invalid literal for int() with base 10: '='
Is =?
not legal chars in the basic password or is the urlparse
implementation incorrect?