我是scrapy的新手,我在scrapy中创建了一个示例项目并运行该项目。我收到了一个错误
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)
提前致谢
答案 0 :(得分:16)
我有类似的错误,发现pyopenssl安装不正确
简单地做了
sudo apt-get install libssl-dev
然后
scrapy再次刮擦pip install pyopenssl --upgrade
linux mint 18.1