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