爬虫时遇到问题:
TypeError: cannot use a string pattern on a bytes-like object
error在findall处
这是python2和python3之间的差别引起的
需要加上语句:
html=html.decode(“utf-8”)
爬虫时遇到问题:
TypeError: cannot use a string pattern on a bytes-like object
error在findall处
这是python2和python3之间的差别引起的
需要加上语句:
html=html.decode(“utf-8”)
相关文章: