Hi all, I have a problem with mechanize and I can't get out from it.

I have this code:

br = mechanize.Browser()
br.open('http://wwww.example.com/formpage.html')
forms = br.forms()
for i in forms:
    print type(i)

I get all the forms on the page.

<type 'instance'>
<type 'instance'>
<type 'instance'>
<type 'instance'>
<type 'instance'>
<type 'instance'>

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!

Any number I tried get None as result

for i in range(6):
    print br.select_form(nr=i)



None
None
None
None
None
None

Anyone can help me? Thanks

--
Karim Gorjux
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to