作者panpass (往往往往)
看板Python
标题Re: scrapy xpath extraction 以及其编码的问题
时间Wed Dec 3 02:42:43 2014
import HTMLParser as HP
s = u"结婚并无Z>B"
h = HP.HTMLParser()
print h.unescape(s).encode("utf-8")
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 5.51.13.167
※ 文章网址: http://webptt.com/cn.aspx?n=bbs/Python/M.1417545766.A.451.html