I am trying to obtain data on a https site, but everytime I try to access the data that is behind the logon screen, I get the logon page instead. I was able to successfully do a test problem:

import sys, urllib2, urllib

zipcode = "48103"
url = 'http://www.wunderground.com/cgi-bin/findweather/getForecast'
data = urllib.urlencode([('query', zipcode)])
req = urllib2.Request(url)
fd = urllib2.urlopen(req, data)
while 1:
    data = fd.read(1024)
    if not len(data):
        break
    sys.stdout.write(data)

which performed as I expected.

However, for the url 'https://secure.umcu.org/cgi-bin/mcw000.cgi?MCWSTART'
with data = ... {'HBUSERNAME':username,'PASSWORD':password}

I was sent just the logon screen. Am I missing something important that has to do with interaction with javascript, https, or cgi, or something completely different?


Thanks. 
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to