Python crawler automatically recognizes the corresponding code

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

 

Guess you like

Origin blog.csdn.net/weixin_41822224/article/details/113104958