【Scrapy】【SSL】scrapy中HTTPS协议握手报错问题

记录一个SSL问题:

twisted.web._newclient.ResponseNeverReceived: []


官方文档:

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'

 

你可能感兴趣的:(爬虫)