python response.xpath无效_python – Scrapy error ” AttributeError: ‘HtmlResponse’ object has no attribu…

When I try the scrapy shell, I have some 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 help me solve this problem?

python

scrapy

attributeerror

this question

edited Apr 10 ’15 at 14:56

alecxe 269k 45 408 612 asked Apr 10 ’15 at 1:49

kinson li 17 2

2 Answers

you should upgrade scrapy

2.Uncompress Filest the error cannot import name xmlrpc_client After looking into a stachoverflow question here i have fixed it using sudo pip uninstall scrapysudo pip install scrapy==0.24.2 but now it shows me exceptions.Attr

Original: https://blog.csdn.net/weixin_28223453/article/details/113963608
Author: Magic Road
Title: python response.xpath无效_python – Scrapy error ” AttributeError: ‘HtmlResponse’ object has no attribu…

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/789787/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球