python 爬虫 自动识别相应编码

res = s.get(urlTemp, headers=headers, timeout=5)
res.encoding = res.apparent_encoding
# html_ = etree.HTML(res.content.decode('gbk'))
print(res.text)

 

你可能感兴趣的:(爬虫,Python,python,爬虫)