当前位置:网站首页>爬虫处理乱码问题
爬虫处理乱码问题
2022-08-09 14:37:00 【菜鸟圣美】
我们在网站上,爬取资料的时候不免会出现乱码问题,怎么解决呢?

问题分析:
apparent_encoding的编码方式和encoding的编码方式不一样造成的,本来应该用apparent_encoding编码,实际却用的是encoding编码

解决办法:
将encoding的编码格式改成apparent_encoding编码格式
response.encoding = response.apparent_encoding

问题解决hhhhhhhhh
边栏推荐
猜你喜欢

刷完这174道Android开发面试题,搞懂所有技术栈

A wave of Versailles: assault by the ali interview guide, I've got nine of the Offer

Docker安装Redis详细步骤

*4-1 CCF 2014-12-1 Access Control System

从软件哲学角度谈 Amazon SageMaker(第一讲)

VMWare不使用简易安装,手动安装ISO操作手册

table中 You may have an infinite update loop in a component render function问题解决

Assembly language learning (2)

CTF problem solution five Web PHP Dafa (experiment)

*3-4 CCF 2014-09-3 String matching
随机推荐
nav标签的作用
概率论基础知识整理 | 随机变量的数字特征
极限挑战,如何做到分钟级搭建环境?
After reading the "Redis In-depth Notes" compiled by Tencent bosses in 90 days, I worshipped on the spot.
YOLOv5网络详解
Assembly language learning (4)
从TRPO到PPO(理论分析与数学证明)
正则表达式实战:最新豆瓣top250爬虫超详细教程
JUC容器介绍
[LeetCode] 485.最大连续 1 的个数
BVT测试(版本验证测试、冒烟测试)和Daily build
30分钟使用百度EasyDL实现健康码/行程码智能识别
一款翻译机背后的全球经济浪潮
Assembly language learning (2)
C语言程序设计笔记(浙大翁恺版) 第十一周:结构类型
深圳堡垒机厂家有哪些?重点推荐哪家?
Docker安装MySQL详细步骤
* 2-2 OJ 1163 missile interception of beta
[Database] How does Sqlserver backup the database regularly and clear it regularly
升级适配AGP 7.0