python去除html空格

如下面的

1 <td>&nbsp;柳暗花溟</td>

html里面的空格&nbsp,想直接用strip()函数去除是不可能的,必须显式的去掉xa0

例如以上的就可以这样的方式去除空格

1 author = author.strip("

    xa0")

记录一下。

不对之处欢迎指正
原文地址:https://www.cnblogs.com/qggg/p/6719495.html