I have a querystring like a=2&b=3 created by serialize() jQuery.
How to get a and b with a Python function?
1 Answer
python2: urlparse.parse_qs()
python3: urllib.parse.parse_qs
6 Comments
imez
it seems urlparse.parse_qs() get query string from url. i need to get a and b separately like a=2 b=3
imez
need to get a and b separately like a=2 b=3
Ignacio Vazquez-Abrams
What other idea could you possibly need? Did you try looking at the returned dictionary?
Ignacio Vazquez-Abrams
... Stop picking random functions and use the one I gave you.
imez
what is this error? when i run this code: urlparse.parse_qs('a=1&b=2') 'function' object has no attribute 'parse_qs'
|