errors参数有3个值:strict,  ignore,  replace

 

html.decode("utf-8"),这种形式有时会报错,那么修改为下面形式,将decode函数的第二个参数errors设置为ignore,默认是strict
html.decode("utf-8",'ignore')


相关文章:

  • 2021-08-29
  • 2021-09-28
  • 2021-06-26
  • 2021-10-28
  • 2021-03-31
  • 2021-11-30
  • 2021-07-30
  • 2021-10-22
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-07
  • 2022-12-23
  • 2021-11-19
  • 2021-06-15
  • 2021-06-11
相关资源
相似解决方案