我有一个html页面:
在那里我们可以看到我们有 在许多地方。还有许多其他unicode字符。我想提取这一页的内容。
我要做的是:def removeNonAscii(s): return "".join(i for i in s if ord(i)<128)
myName = soup.findAll("div", {"class" : "theater"})
for x in myName:
xt = str(x)
print removeNonAscii(xt)
print "
"
结果是:Esquare Victory Camp
site no 2429,general thimayya road, camp contonment,oppositekayani bakery, Pune - 020 2613 2975
Hawaa Hawaai
Drama - Hindi
10:30am  3:45  6:00  8:30pm
The Amazing Spider Man 2
Action/Adventure/Thriller - English - Trailer
1:00  10:45pm
除了 ,一切看起来都很好。我试着更换,也寻找其他解决方案,但仍然没有解决方案。我认为没有;的 会造成问题。如何删除 ?