Re: scrapy xpath extraction 以及其編碼的問題
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://www.ptt.cc/bbs/Python/M.1417545766.A.451.html
討論串 (同標題文章)