【发布时间】:2019-06-21 13:56:48
【问题描述】:
我对使用 Scrapy 还很陌生,并且已经编写了大约 2 年的代码(抱歉,如果这是一个愚蠢的问题)。
我目前正在尝试抓取一般信息,例如网站是否在网站列表中具有“隐私政策”链接或“关于我们”链接。我已经能够在具有支持 HTTPS 的 URL 或具有实时链接的网站上抓取信息。
对于无法加载或存在 HTTPS 与 HTTP 问题的网站,我遇到了一些例外情况:
twisted.web._newclient.ResponseNeverReceived: [<twisted.python.failure.Failure twisted.internet.error.ConnectionLost: Connection to the other side was lost in a non-clean fashion: Connection lost.>]twisted.web._newclient.ResponseNeverReceived: [<twisted.python.failure.Failure OpenSSL.SSL.Error: [('SSL routines', 'ssl3_get_record', 'wrong version number')]>]
根据蜘蛛的多次爬取,我发现生成的.csv 的网站排除了这些链接。
我想知道如果可能的话,如何让蜘蛛将这些失败的链接包含在每列的预设参数中。
【问题讨论】: