我收到此錯誤scrapyResponse對象有沒有屬性編碼,scrapy錯誤
File "/usr/lib/pymodules/python2.7/scrapy/selector/factories.py", line 20, in body_as_utf8
if response.encoding in utf8_encodings:
exceptions.AttributeError: 'Response' object has no attribute 'encoding'
導致它只是在scrapy蜘蛛
def parse(self, response):
hxs = HtmlXPathSelector(response)
我想下面的代碼解析URL
http://itunes.apple.com/WebObjects/MZStore.woa/wa/customerReviews?id=382034404%0A
與用戶代理字符串
iTunes/10.2 (Macintosh; U; PPC Mac OS X 10.2)
任何想法可能是什麼錯誤?我覺得奇怪,我,這個代碼總是在我其他所有的蜘蛛