运行scrapy时出现以下错误。 有人可以让我知道哪个版本的scrapy更稳定?
我已经提到了以下页面,没有任何帮助,所以打开了一个新主题。
scrapy: 'module' object has no attribute 'OP_SINGLE_ECDH_USE'
错误:
self._options |= SSL.OP_SINGLE_DH_USE | SSL.OP_SINGLE_ECDH_USE
AttributeError: 'module' object has no attribute 'OP_SINGLE_ECDH_USE'
2017-06-09 10:05:54 [scrapy.core.scraper] ERROR: Error downloading <GET https://www.yellowpages.com.au/search/listings?clue=debt+collection+services&eventType=pagination&locationClue=Australia&pageNumber=4&referredBy=www.yellowpages.com.au>
pip冻结:
asn1crypto==0.22.0
attrs==17.2.0
Automat==0.6.0
cffi==1.10.0
constantly==15.1.0
cryptography==1.9
cssselect==1.0.1
enum34==1.1.6
idna==2.5
incremental==17.5.0
ipaddress==1.0.18
lxml==3.8.0
parsel==1.2.0
pkg-resources==0.0.0
pyasn1==0.2.3
pyasn1-modules==0.0.9
pycparser==2.17
PyDispatcher==2.0.5
pyOpenSSL==17.0.0
queuelib==1.4.2
Scrapy==1.4.0
service-identity==17.0.0
six==1.10.0
Twisted==17.1.0
w3lib==1.17.0
zope.interface==4.4.1
蜘蛛代码没有任何问题,但几个月后我就开始使用scrapy了,所以不确定是否有变化。
Class YellowSpider(Spider):
name = "yellowpages"
allowed_domains = ["www.yellowpages.com.au"]
start_urls = []
for i in range(1,5):
start_urls.append("https://www.yellowpages.com.au/search/listings?clue=debt+collection+services&eventType"
"=pagination&locationClue=Australia&pageNumber=%s&referredBy=www.yellowpages.com.au"
% i)
def parse(self, response):
hxs = HtmlXPathSelector(response)
item = YellowpagesItem()
companies = hxs.select("//*[@class='cell in-area-cell middle-cell']")
for comapny in companies:
name = hxs.select("//a[@class='listing-name']/text()").extract()
print name
答案 0 :(得分:4)
谢谢,卡斯帕。 移动扭曲到16.4.1 解决了这个问题。如果有人面临类似问题,请发布答案。