爬虫时遇到问题:
TypeError: cannot use a string pattern on a bytes-like object
TypeError: cannot use a string pattern on a bytes-like object
error在findall处
TypeError: cannot use a string pattern on a bytes-like object
这是python2和python3之间的差别引起的

需要加上语句:
html=html.decode(“utf-8”)
TypeError: cannot use a string pattern on a bytes-like object

TypeError: cannot use a string pattern on a bytes-like object
TypeError: cannot use a string pattern on a bytes-like object

相关文章:

  • 2021-12-10
  • 2021-06-17
  • 2021-10-17
  • 2021-07-13
猜你喜欢
  • 2021-05-24
  • 2022-12-23
  • 2022-12-23
  • 2021-07-15
相关资源
相似解决方案