abbiejoy21 0 Newbie Poster

I have the following code working perfectly for basic authentication with http. I'm going to be changing the site, however, to https. Can anyone point me in the right direction here?

import urllib2
from matplotlib.dates import strpdate2num
from matplotlib.mlab import load
from pylab import figure, show
import urllib
theurl = 'http://sitename.html'
username = 'username'
password = 'password'
passman = urllib2.HTTPPasswordMgrWithDefaultRealm()
passman.add_password(None, theurl, username, password)
authhandler = urllib2.HTTPBasicAuthHandler(passman)
opener = urllib2.build_opener(authhandler)
urllib2.install_opener(opener)
pagehandle = urllib2.urlopen(theurl)
urllib.urlretrieve('http://sitename/log.csv', 'c:\log.csv')