I am trying to use the mechanize module to automate a task on the web. I am able to get the first form to submit correctly. After I submit the first form I would like to take the data from the second website(or form) I am taken to(after I enter my first and last name) and enter in more information. Can someone tell me how to take information from second form and submit data into that form? Thanks.
import mechanize import re br=mechanize.Browser() br.open('www.example.com') br.select_form(nr=1) br['firstName']='firstname' br['lastName']='lastname' br.submit() #How can I open up the website I am taken to after I submit my first and last name?