Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

53 lines (44 sloc) 1.433 kB
一、配置文件说明
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":"abc@example.com",
"password":"888888",
"port":25,
"to":"a@example.com,b@example.com..." 接收统计邮件的邮箱,用逗号分隔
}
}
二、发送微博(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任务即可
Jump to Line
Something went wrong with that request. Please try again.