记录一个SSL问题:
twisted.web._newclient.ResponseNeverReceived: [<twisted.python.failure.Failure OpenSSL.SSL.Error: [('SSL routines', 'ssl23_read', 'ssl handshake failure')]>]
官方文档:
DOWNLOADER_CLIENT_TLS_CIPHERS
Default: 'DEFAULT'
Use this setting to customize the TLS/SSL ciphers used by
the default HTTP/1.1 downloader.
The setting should contain a string in the OpenSSL cipher list format,
these ciphers will be used as client ciphers. Changing this setting
may be necessary to access certain HTTPS websites: for example, you
may need to use 'DEFAULT:!DH' for a website with weak DH parameters
or enable a specific cipher that is not included in DEFAULT if a
website requires it.
DEBUG:
在scrapy项目的配置文件settings.py中,加入如下:
'DOWNLOADER_CLIENT_TLS_CIPHERS': 'DEFAULT:!DH'