mechanize, how send forms?

Duncan Booth duncan.booth at invalid.invalid
Sat Aug 26 09:35:09 EDT 2006


Kowalski wrote:

> 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() 
> #???
> 
> 
Google publish an api for searching. Use that instead of trying to spoof 
the web interface.



More information about the Python-list mailing list