python爬虫使用requests和BeautifulSoup出现中文乱码

python爬虫使用requests和BeautifulSoup出现中文乱码 requests和BeautifulSoup都是自行检测网页编码并进行编码的,因此可能会出现检测错误,须要手动更改编码方式,使得中文可以正常显示html from bs4 import BeautifulSoup import requests headers = { 'user_agent': 'Mozilla/5.0
相关文章
相关标签/搜索