Home Tags About

Parsing URL query parameters in Python

12 Mar 2012
python url

Code:

#!python
from urlparse import urlparse
url = urlparse(URL)
params = dict([part.split('=') for part in url.query.split('&')])