« Back to Index

Python extract query string params in order they are specified

View original Gist on GitHub

Python extract query string params in order they are specified.py

# use regex instead of urlparse as it was inconsistent ordering
params = re.findall(r'[(\?|\&)]([^=]+)', url)