weiboSpider icon indicating copy to clipboard operation
weiboSpider copied to clipboard

文件保存问题

Open FXM12581 opened this issue 3 years ago • 3 comments
trafficstars

您好,我想请教一下我一次爬取多个用户信息时,怎么把这些信息写入到一个文件(如txt,csv)中而不是像之前那样每个用户一个文件

FXM12581 avatar Jun 14 '22 13:06 FXM12581

如果仅用户信息,weibo-crawler可以找到,如果包含微博,需要修改代码。

dataabc avatar Jun 14 '22 13:06 dataabc

您好,我看weibo-crawler这个项目似乎在保存时也是按照昵称或者id分别建立一个文件,不是把所有的信息放在一个文件里面?需要进行什么调整呢?谢谢!

FXM12581 avatar Jun 20 '22 11:06 FXM12581

weibo-crawler的write_csv方法有file_fath变量,你可以把它改成固定值,这样csv就会写在一个文件里。

dataabc avatar Jun 20 '22 14:06 dataabc

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 20 '22 19:09 stale[bot]

Closing as stale, please reopen if you'd like to work on this further.

stale[bot] avatar Sep 28 '22 02:09 stale[bot]