scrpython中的ssl握手失败错误

2024-10-01 17:26:35 发布

您现在位置:Python中文网/ 问答频道 /正文

目前我正在研究刮痧和以下是我的蜘蛛网.py代码

class Example(BaseSpider):
    name = "example"
    allowed_domains = {"http://www.example.com"}


    start_urls = [
        "https://www.example.com/rwjhamilton/index.cfm?&ijobcatid=100&ijobrowset=1&cjobattr1=All&template=dsp_job_list.cfm"
    ]


    def parse(self, response):
        hxs = HtmlXPathSelector(response)
        href_tags = hxs.select('//font[@class="bannertext"]/u/a/@href').extract()
        print href_tags,">>>>>>>>>>>>>>>>"

结果:

^{pr2}$

这个错误对小淘气来说似乎很新鲜,我真的不知道怎么解决这个问题,谁能告诉我这个错误为什么会出现以及如何解决它吗。 实际上,我正试图收集上述url中的href标记,似乎总共有40个href标记

有时响应是下载的,有时是显示的

2012-07-19 17:39:15+0530 [example] DEBUG: Retrying <GET https://www.example.com/rwjhamilton/index.cfm?&ijobcatid=100&ijobrowset=1&cjobattr1=All&template=dsp_job_list.cfm> (failed 1 times): Connection to the other side was lost in a non-clean fashion

请告诉我怎么解决这个问题。 提前谢谢。。。。。在


Tags: httpscomindexexamplewwwtemplateallclass
2条回答

我也遇到了这个错误:

2013-03-07 06:58:01+0800 [CrawlSpider] ERROR: Error downloading <GET a_website_url>: Connection to the other side was lost in a non-clean fashion.

我讨厌的版本是0.16.3。原因是它对我国来说是一个受限制的网站。在

我想这个问题已经解决了

https://github.com/scrapy/scrapy/pull/186

它已经在0.15释放后修复

相关问题 更多 >

    热门问题