我正在使用扭曲的getPage()获得握手失败问题。
我使用的是Amazon Linux AMI 2015.03版。它附带Python 2.6.9和我正在使用的扭曲版本是:
python26-twisted-web-8.2.0-3.2.3.amzn1.x86_64
python26-twisted-core-8.2.0-4.7.amzn1.x86_64
python26-twisted-words-8.2.0-3.2.3.amzn1.x86_64
代码在这里:
from twisted.web import client
from twisted.internet import reactor
if __name__ == "__main__":
def do( ):
df = client.getPage(
url = "https://ui2web1.apps.uillinois.edu/BANPROD1/bwskfcls.P_GetCrse",
followRedirect = True,
)
def printOnError( error ):
print 'E', error
def printOnSuccess( page ):
print 'S', page
df.addErrback( printOnError )
df.addCallback( printOnSuccess )
return df
reactor.callWhenRunning( do )
reactor.run()
我得到的错误是:
E [Failure instance: Traceback (failure with no frames): <class 'OpenSSL.SSL.Error'>: [('SSL routines', 'SSL3_READ_BYTES', 'sslv3 alert handshake failure'), ('SSL routines', 'SSL3_READ_BYTES', 'ssl handshake failure')]
]
S
任何帮助都将受到高度赞赏。