最赞回答 / IT男的成长记录
soup = BeautifulSoup(html_doc, 'html.parser', from_encoding='utf-8') 改成小写试试
2016-09-27
最赞回答 / 慕标6571706
已经解决win7 python3.6 遇到乱码的情况同明磊只需要在fout = open('output.html', 'w', encoding = 'utf-8') fout.write("<td>%s</td>" % data['title']) fout.write("<td>%s</td>" % data['summary'])这里面不能加.encode('utf-8'),加了会乱码fout.write("<head><meta ...
2016-09-26
最新回答 / 慕粉3182733
fout.write("<td>%s</td>" % data['title'].encode('utf-8'))fout.write("<td>%s</td>" % data['summary'].encode('utf-8'))看看哪儿是不是写错了
2016-09-24