How to Encode Parameters into an HTML Parsing Script

SMERSH009X at gmail.com SMERSH009X at gmail.com
Fri Jun 22 15:44:53 EDT 2007


On Jun 21, 9:45 pm, "Gabriel Genellina" <gagsl-... at yahoo.com.ar>
wrote:
> En Thu, 21 Jun 2007 23:37:07 -0300, <SMERSH0... at gmail.com> escribió:
>
> > So for example if I wanted to navigate to an encoded url
> >http://online.investools.com/landing.iedu?signedin=truerather than
> > justhttp://online.investools.com/landing.iedu  How would I do this?
> > How can I modify thescriptto 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)
> signedin=true&another=42
>
> Do not use the data argument to urlopen.
>
> --
> Gabriel Genellina

Sweet! I love this python group




More information about the Python-list mailing list