Using urlparse.parse_qs() - first element in dict is keyed onURL+key, instead of just key?

V

Victor Hooi

Hi,

I'm attempting to use urlparse.parse_qs() to parse the following url:

https://www.foo.com/cat/dog-13?utm_source=foo1043c&utm_medium=email&utm_campaign=ba^Cn=HC

However, when I attempt to parse it, I get:

{'https://www.foo.com/cat/dog-13?utm_source': ['foo1043c'],
'utm_campaign': ['ba^Cn=HC'],
'utm_medium': ['email']}

For some reason - the utm_source doesn't appear to have been extracted correctly, and it's keying the result on the url plus utm_source, rather than just 'utm_source'?

Cheers,
Victor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top