'utf-8'报错的问题 不知道错在哪

产生这样的报错'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte
我代码:
from urllib import request
url = "http://odds.500.com/fenxi/yazhi-749525.shtml"
headers = {

"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0"}

req = request.Request(url)
resp = request.urlopen(req)
a = resp.read()
print(a.decode('utf-8'))### 问题描述


素胚勾勒不出你
浏览 1196回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Python