Requests——获取response里的某些内容

r=response.get() 当打印r.text里有乱码时,代码这个a56爆大奖在线娱乐的encoding和apparent_encoding不一致,a56爆大奖在线娱乐这样解决: r.encoding=r.apparent_encoding print(r.text) #这时候就不会有乱码了,常见于返回的是个html时 万能
posted @ 2024-05-17 13:42  云啊云的囤粮地  阅读(4)  评论(0编辑  收藏  举报