作者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/m.aspx?n=bbs/Python/M.1417545766.A.451.html