scrapy:“模块"对象没有属性“OP_SINGLE_ECDH_USE" [英] scrapy: 'module' object has no attribute 'OP_SINGLE_ECDH_USE'
本文介绍了scrapy:“模块"对象没有属性“OP_SINGLE_ECDH_USE"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是scrapy的新手,我在scrapy中创建了一个示例项目并运行该项目.我有一个错误
I am new in scrapy, I create a sample project in scrapy and run the project. I got an error
AttributeError: 'module' object has no attribute 'OP_SINGLE_ECDH_USE'
代码:
import scrapy
class DmozSpider(scrapy.Spider):
name = "dmoz"
allowed_domains = ["dmoz.org"]
start_urls = ["https://www.grocerygateway.com"]
def parse(self, response):
filename = response.url.split("/")[-2]
with open(filename, 'wb') as f:
f.write(response.body)
提前致谢
推荐答案
我也出现了类似的错误,发现pyopenssl没有正确安装
I had a similar error, found that pyopenssl was not installed correctly
简单的
sudo apt-get install libssl-dev
sudo apt-get install libssl-dev
然后
pip install pyopenssl --upgrade
pip install pyopenssl --upgrade
又刮又刮了
Linux 薄荷 18.1
linux mint 18.1
这篇关于scrapy:“模块"对象没有属性“OP_SINGLE_ECDH_USE"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文