python - Scrapy error " AttributeError: 'HtmlResponse' object has no attribute 'xpath' " -


when try scrapy shell, have problems can not solve.

in [1]: response.xpath('//title') --------------------------------------------------------------------------- attributeerror traceback (most recent call last) in () ----> 1 response.xpath('//title') attributeerror: 'htmlresponse' object has no attribute 'xpath'

anyone can me solve problem?

you should upgrade scrapy

steps: 1.download scrapy 0.24.6 http://pypi.python.org/packages/source/s/scrapy/scrapy-0.24.6.tar.gz

2.uncompress files

3.and then: f:\scrapy-0.24.6>python setup.py install


Popular posts from this blog