学习爬虫时遇到的问题TypeError: cannot use a string pattern on a bytes-like object 与解决办法

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zhao_5352269/article/details/83782778

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

python2.7和Python3的区别,Python3需要给代码加上

html = html.decode('utf-8')

Python2.7则不需要

猜你喜欢

转载自blog.csdn.net/zhao_5352269/article/details/83782778