Hi, I want to make a program that opens a url, finds the data I need, and returns it to me. The problem is I have to login to the website, and I don't know how to do this. I've looked at some examples, and this is what I have so far.
import urllib
import urllib2
# Build opener with HTTPCookieProcessor
o = urllib2.build_opener( urllib2.HTTPCookieProcessor() )
urllib2.install_opener( o )
# Parameters to submit
p = urllib.urlencode( { 'stuident': 'stuid', 'stupassword': 'password' } )
# Login with params
f = o.open( 'https://webconnect.bloomfield.org/Zangle/StudentConnect/', p )
data = f.read()
print data
f.close()
It doesn't give any errors but it doesn't login either.