mechanize, how send forms?

Paul McGuire ptmcg at austin.rr._bogus_.com
Sat Aug 26 08:26:58 EDT 2006


"Kowalski" <kowadam at gmail.com> wrote in message 
news:1156586954.498802.143960 at m73g2000cwd.googlegroups.com...
> from mechanize import Browser
>
> br = Browser()
> br.open("http://www.google.com") #example
>
> for form in br.forms():
>    print form
>
> br.select_form(name="f")
> br["q"] = "Blah"
>
> #???
> #response1=br.submit()
> #???
>
Check out twill, it puts a wrapper around mechanize to make this kind of 
thing pretty easy.

-- Paul 





More information about the Python-list mailing list