urllib.error.URLError:

You should use urllib.parse.urlencode(), urllib.parse.urljoin(), etc functions to construct urls instead of manually joining the strings. It would take care of : -> %3A conversion e.g.:

>>> import urllib.parse
>>> urllib.parse.quote(':')
'%3A'

Leave a Comment