爬虫时遇到问题:
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

相关文章: