This is my first programming experience with Python, and I'm trying to enter this
web page. After searching, I found that many people suggested using mechanize. Just to be sure that I configured correctly, before I get the code, I downloaded the zip from mechanizethe website and got my python script in the unpacked mechanization folder.
I have this code so far, using different examples that I found:
import mechanize
theurl = 'http://voyager.umeres.maine.edu/Login'
mech = mechanize.Browser()
mech.open(theurl)
mech.select_form(nr=0)
mech["userid"] = "MYUSERNAME"
mech["password"] = "MYPASSWORD"
results = mech.submit().read()
f = file('test.html', 'w')
f.write(results)
f.close()
- , / - . script IDLE, , - . :
, , . , . , , - , , json RSS-, Python, , .