准备requests 解决HTML乱码问题 soup = BeautifulSoup(content.decode(html_encode,errors=’ignore’), “html.parser”)#html_encode=’gb2312’ 先将byte型的content解码为str后,用str类型数据初始化BeautifulSoup