0
点赞
收藏
分享

微信扫一扫

Python爬虫:requests库改变编码

爱喝酒的幸福人 2022-01-12 阅读 73
import requests

url = 'https://www.csdn.net/'#原编码为utf-8

response = requests.get(url)
response.encoding = 'gbk'
print(response.encoding)

结果

gbk

举报

相关推荐

0 条评论