-
Notifications
You must be signed in to change notification settings - Fork 12
scrapy若干错误(parse string to response)
Shuang0420 edited this page Jun 23, 2016
·
1 revision
response.body
response = response.body.decode('gbk','ignore').replace("", "").replace("", "") html = HtmlXPathSelector(response)
TypeError: cannot create weak reference to 'str' obj
/Users/sure/Desktop/python/Crawler/tieba/tieba/spiders/TiebaSpider.py:7: ScrapyDeprecationWarning: Module `scrapy.spider` is deprecated, use `scrapy.spiders` instead
from scrapy.selector import Selector response = response.body.decode('gbk','ignore').replace("", "").replace("", "") html = Selector(text=response)
[[TOC]]