opener.addheaders = [('User-Agent',
    'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11'
    )]
stylesheets = ['https://www.idcourts.us/repository/css/id_style.css',
    'https://www.idcourts.us/repository/css/id_print.css']
home = opener.open('https://www.idcourts.us/repository/start.do')
print(cj)
sessid = cj._cookies['www.idcourts.us']['/repository']['JSESSIONID'].value
opener.addheaders += [('Referer',
    'https://www.idcourts.us/repository/start.do')]
for st in stylesheets:
    opener.open(st + ';jsessionid=' + sessid)
search = opener.open('https://www.idcourts.us/repository/partySearch.do')
print(cj)
Python - urllib2 & cookielib