Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

数据统计页面拿不到数据,请求拿到的数据全部为空,我看线上的是有数据的,为什么啊? #7

Open
yvonnegithub opened this issue Apr 20, 2017 · 2 comments

Comments

@yvonnegithub
Copy link

togji

@ccforward
Copy link
Owner

哦 这点忘记在README.md里说明了 不过在代码 app.js 里有说明
https://github.com/ccforward/zhihu/blob/master/app.js#L50

// 生成统计数据
const statistic = require('./statistic')
// 参数为需要统计的月份数组
statistic.start(['201609', '201608'])

start 里面的数组参数就是你已经爬下来的数据的月份比如上面的 201609 和 201608

@yvonnegithub
Copy link
Author

爬虫开启后会自动把数据存到数据库里吗?可是我看了一下数据库,没有任何数据,需要统计的月份只能自己手动指定吗,我看线上的是自动统计每一年所有月份的数据,这个是怎么做的?附上启动时报的错
default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants