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'
More Related Contents:
- How to use urllib with username/password authentication in python 3?
- How do I find the number of fridays between two dates(including both the dates) [closed]
- name ‘Yes’ is not defined
- selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable when clicking on an element using Selenium Python
- Pygame window freezes when it opens
- AttributeError: ‘module’ object has no attribute ‘urlopen’
- Attempted relative import with no known parent package
- Last unbuffered line can’t be read
- python 3.x ImportError: No module named ‘cStringIO’
- finding values in pandas series – Python3
- Unable to import sqlite3 using Anaconda Python
- When importing tensorflow, I get the following error: No module named ‘numpy.core._multiarray_umath’
- Months as axis ticks
- Implementing a backspace in Python 3.3.2 Shell using Idle [duplicate]
- Python: casting map object to list makes map object empty?
- Speed up bitstring/bit operations in Python?
- pip throws “TypeError: deprecated() ” error
- Tkinter module not found on Ubuntu
- Multiple Displays in Pygame
- Flask: Get gzip filename sent from Postman
- Python 3 urllib produces TypeError: POST data should be bytes or an iterable of bytes. It cannot be of type str
- Flexible appending new data to yaml files
- Python 3.4 on Sublime Text 3
- Pandas send email containing dataframe as a visual table
- How do I print colored output with Python 3?
- How to retrieve the whole message body using Gmail API (python)
- selenium.common.exceptions.WebDriverException: Message: unknown error: unable to discover open pages using ChromeDriver through Selenium
- Browser Cookie never expires
- Debugging Numpy VisibleDeprecationWarning (ndarray from ragged nested sequences)
- How to determine what version of python3 tkinter is installed on my linux machine?