PythonSpiderNotes icon indicating copy to clipboard operation
PythonSpiderNotes copied to clipboard

网易新闻爬取项目输出的txt文档出现乱码

Open latioas opened this issue 6 years ago • 0 comments

网易新闻爬取项目输出的txt文档出现乱码, 当15,16行做出如下修改后,输出的txt文档正常了。

    with open(path, "w+") as fp:
        for s in slist:
            print(s[0], s[1])                           
            fp.write("%s\t\t%s\n\n" %(s[0],s[1]))    

latioas avatar Jan 23 '19 08:01 latioas