How to Encode Parameters into an HTML Parsing Script

Gabriel Genellina gagsl-py2 at
Fri Jun 22 06:45:44 CEST 2007

En Thu, 21 Jun 2007 23:37:07 -0300, <SMERSH009X at> escribió:

> So for example if I wanted to navigate to an encoded url
> rather than
> just   How would I do this?
> How can I modify the script to urlencode these parameters:
> {signedin:true}     and to associate them with a specific url from the
> urlList

If you want to use GET, append '?' plus the encoded parameters to the  
desired url:

py> data = {'signedin':'true', 'another':42}
py> print urlencode(data)

Do not use the data argument to urlopen.

Gabriel Genellina

More information about the Python-list mailing list