2012/4/14 Karim Gorjux <lemieli...@gmail.com> > Il mio problema è che non riesco a selezionare il form a cui voglio > mandare degli input, mentre con la funzione forms mi trova tutti i form > incluso quello che voglio usare. Qualcuno ha idee in merito!? >
Google is your friend. Non conosco Mechanize, ma credo che non si debba usare così. Cercando su web ho trovato questo esempio<http://stackoverflow.com/questions/2067915/error-in-using-python-mechanize-select-form> : br = Browser(); br.open("http://www.atpworldtour.com/Rankings/Singles.aspx"); br.select_form(nr=0); br["r"] = "101"; E anche sul sito <http://wwwsearch.sourceforge.net/mechanize/> di Mechanize lo usano così: br.select_form(name="order") # Browser passes through unknown attributes (including methods) # to the selected HTMLForm. br["cheeses"] = ["mozzarella", "caerphilly"] # (the method here is __setitem__) # Submit current form. Browser calls .close() on the current response on # navigation, so this closes response1 response2 = br.submit() Ciao. Marco. -- http://beri.it/ - Un blog http://beri.it/i-miei-libri/ - Qualche libro
_______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python