This works:
# Proxy credentials
proxyAuth = base64.encodestring('%s:%s' % (proxy_username,
proxy_password))
proxy_authHeader = "Basic " + proxyAuth.strip()
# Web site credentials
basicAuth = base64.encodestring('%s:%s' % (username,
password))
authHea
from twisted.web import client
from twisted.internet import reactor
import base64
import sys
def printPage(data):
print data
reactor.stop()
def printError(failure):
print >> sys.stderr, "Error:", failure.getErrorMessage()
reactor.stop()
if len(sys.argv) == 4:
url = sys.argv[1