get https page

ben santoshamb at yahoo.com
Mon Sep 6 03:30:00 CEST 2004


Heres what I did to get it to work.

Activestate python 2.3.2 does not come with the ability to connect
over a secure layer, so you have to download the file at this address:

http://www.junkheap.net/projects/python-windows-ssl/python-windows-ssl.html

after you install his code, the following will work:

import httplib

HOSTNAME = 'www.schedulesource.com'
conn = httplib.HTTPSConnection(HOSTNAME,443)
conn.putrequest('GET', '/teamwork/logon/')
conn.endheaders()
response = conn.getresponse()
print response.read()

(I was trying to write a login script for schedulesource.com)

Ben


santoshamb at yahoo.com (ben) wrote in message news:<56d498d9.0409030934.43a1952e at posting.google.com>...
> "Jonathan  Ellis" <jbellis at gmail.com> wrote in message news:<ch8qgq$k17 at odak26.prod.google.com>...
> > >>> import urllib
> > >>> r =
>  urllib.urlopen("https://www.schedulesource.com/teamwork/logon/")
> > >>> r.read()
> > '\r\n<!DOCTYPE HTML PUBLIC...
> > 
> > -Jonathan
> 
> 
> Thanks for the answer Jonathan.  The solution I found was a bit
> different. I'm going to post it when I get home, for future reference.
> 
> Ben



More information about the Python-list mailing list