背景:爬虫获取网页数据
代码:
运行时,显示乱码:
使用F12查看网页的编码格式为utf-8
于是,想要通过指定encoding=utf-8的方式修改,即:
# content = page.content.decode("utf-8") # print(con
背景:爬虫获取网页数据
代码:
运行时,显示乱码:
使用F12查看网页的编码格式为utf-8
于是,想要通过指定encoding=utf-8的方式修改,即:
# content = page.content.decode("utf-8") # print(con