简体   繁体   English

scrapy python中的ssl握手失败错误

[英]ssl handshake failure error in scrapy python

Presently i am working on scrapy and following is my spider.py code 目前我正在研究scrapy,以下是我的spider.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,">>>>>>>>>>>>>>>>"

Result : 结果:

2012-07-19 17:32:20+0530 [example] ERROR: Error downloading <GET https://www.example.com/rwjhamilton/index.cfm?&ijobcatid=100&ijobrowset=1&cjobattr1=All&template=dsp_job_list.cfm>: [('SSL routines', 'SSL23_READ', 'ssl handshake failure')]

This error seems very new to scrapy and really i don't know how to solve this, can anyone let me know why this error came and how to solve it. 这个错误似乎非常陌生,实际上我不知道如何解决这个问题,有人可以让我知道为什么会出现这个错误以及如何解决它。 Actually i am trying to collect the href tags in the above url and it seems there totally 40 href tags 实际上,我正在尝试在上述网址中收集href标签,看来总共有40个href标签

Also sometimes the response is downloading and sometimes it is displaying 另外有时响应正在下载中,有时正在显示

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

Please let me know how to solve this. 请让我知道如何解决此问题。 Thanks in advance..... 提前致谢.....

I think this issue has been fixed here 我认为这个问题已经解决

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

It has been fixed after 0.15 release of scrapy 0.15刮板释放后已修复

I met this error too: 我也遇到了这个错误:

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.

My scrapy version is 0.16.3. 我的拼凑版本是0.16.3。 The reason is that it is a restricted website for my country. 原因是,这是我的国家/地区的受限制的网站。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM