本人浏览器默认打开导出html编码为gbk乱码,建议咋html指定编码
fout=open('output1.html','w')
fout.write("<html>")
fout.write("<head>")
fout.write("<meta charset=""UTF-8"">")
fout.write("<body>")
fout=open('output1.html','w')
fout.write("<html>")
fout.write("<head>")
fout.write("<meta charset=""UTF-8"">")
fout.write("<body>")
2016-09-25
最新回答 / 慕粉3182733
fout.write("<td>%s</td>" % data['title'].encode('utf-8'))fout.write("<td>%s</td>" % data['summary'].encode('utf-8'))看看哪儿是不是写错了
2016-09-24
node['href']能获取到吗?
报错:TypeError: list indices must be integers, not str
报错:TypeError: list indices must be integers, not str
2016-09-23
运行成功。我打算修改成360百科,改了spider_main的root网页,改了spider_parser下面那些参数,然后运行失败。。。不知哪里出错了
2016-09-22