I'm not sure how to describe the problems correctly, but anyway, so I want to use mechanize to capture the form and get the input name. however, when I analyze the use of mechanization, it does not display the form name and input name. and if I try manually by looking at the website, I have to check the element so that I can get the input name, but still, it is dynamic, so every time I check the element, it gives me a different name. Any ideas? By the way, the site I'm trying to parse is https://www.ursa.ucla.edu/logon/logon.asp , if anyone is interested.
Here is what I tried:
br = mechanize.Browser(factory=mechanize.RobustFactory()) br.open("https://www.ursa.ucla.edu/logon/logon.asp/") br.select_form(nr=0) print br.response().read()
Thanks Advance, Richard.
source share