Posting to https

dpawlows dpawlows at
Tue Mar 23 23:13:36 CET 2010

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 = ''
data = urllib.urlencode([('query', zipcode)])
req = urllib2.Request(url)
fd = urllib2.urlopen(req, data)
while 1:
     data =
     if not len(data):

which performed as I expected.

However, for the url ''
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?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list