-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
53 lines (44 loc) · 1.4 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
一、配置文件说明
1、复制etc/settings.json.dist为etc/settings.json
2、按照配置说明修改配置文件
{
"logFile":"microblog.log", 日志文件
"mode":"debug", 运行模式
"sendersCount":5, 并发数
"weibo":{
"appkey":"88888888",
"secret":"888888888888888888888888888",
"timeout":30000 到新浪的请求timeout
},
"mysql":{
"host":"172.16.33.237",
"user":"stockradar",
"password":"stockradar",
"database":"stock_radar"
},
"queue":{
"send":"weibo_send", 发送队列的名称
"interval":10000, 出队间隔
"host":"172.16.33.237",
"port":3000
},
"mail":{
"host":"mail.netgen.com.cn",
"user":"[email protected]",
"password":"888888",
"port":25,
"to":"[email protected],[email protected]..." 接收统计邮件的邮箱,用逗号分隔
}
}
二、发送微博(send.js)
执行命令
node send.js
三、抓取转发和评论列表(rt_comment.js)
该程序有两种启动方式:
1、抓取指定日期的评论和转发,如
node /path/to/rt_comment.js 2012-01-31
2、常态执行,抓取24小时前的一分钟内发送的微博的评论和转发,如:
node /path/to/rt_comment.js
四、发送统计邮件(cron/send_mail.sh)
1、配置配置文件中的邮件信息
2、将cron/send_mail.sh配置到cron任务即可