[Tutor] Problem with mechanize and forms

Andreas Perstinger andipersti at gmail.com
Sun Apr 15 14:50:59 CEST 2012


On 2012-04-14 17:46, Karim Gorjux wrote:
> But I can't get any of these forms! I need the first form so I tried
>
> br.select_form(nr=0)
>
> but I get None!

With "br.select_form()" you set the current form which is accessible 
through the "br.form" attribute. The method itself doesnt't return 
anything and thus you get "None" if you do "print br.select_form(nr=0)".

For further processing you have to work with "br.form" and its methods. 
See also help(br.select_form) and help(br.form).

Bye, Andreas


More information about the Tutor mailing list