如下面的

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

 

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

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

1 author = author.strip("\n\r    \xa0")

记录一下。

相关文章:

  • 2022-02-24
  • 2022-03-06
  • 2021-07-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-22
  • 2022-12-23
  • 2022-12-23
  • 2022-03-01
  • 2021-12-29
相关资源
相似解决方案