FAQ
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100323/c5ff6eac/attachment.html>

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedMar 23, '10 at 10:13p
activeMar 23, '10 at 10:13p
posts1
users1
websitepython.org

1 user in discussion

Dpawlows: 1 post

People

Translate

site design / logo © 2021 Grokbase