爱喝酒的幸福人

关注

Python爬虫:requests库改变编码

爱喝酒的幸福人

关注

阅读 74

2022-01-12

import requests

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

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

结果

gbk

相关推荐

迎月兮

python爬虫--Requests库

迎月兮 210 0 0

夏沐沐

python-requests库(爬虫)

夏沐沐 103 0 0

闲鱼不咸_99f1

【python】python爬虫requests库详解

闲鱼不咸_99f1 94 0 0

梦为马

Python爬虫:requests库基本使用

梦为马 88 0 0

芷兮离离

Python爬虫--Requests 库用法大全

芷兮离离 176 0 0

kolibreath

Python requests爬虫

kolibreath 31 0 0

你带来了我的快乐

Python requests库(爬虫和接口测试)

你带来了我的快乐 43 0 0

时光已翩然轻擦

Python爬虫之requests库的使用

时光已翩然轻擦 147 0 0

星河出山

Python网络爬虫之requests库Scrapy爬虫比较

星河出山 37 0 0

芥子书屋

【爬虫高阶】精通requests库爬虫

芥子书屋 78 0 0

精彩评论(0)

0 0 举报