错误描述
Traceback (most recent call last):
File "D:/MyDevTools/PCrawler/crawler_demo/requests/douban_json.py", line 31, in
print(resp.content.decode())
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe2 in position 0: invalid continuation byte
进程已结束,退出代码1
引起原因
请求头带有: "accept-encoding": "gzip, deflate, br",
解决方法·
删掉即可。
评论区