TODO: extractor openrec

This commit is contained in:
eson
2020-07-10 12:05:33 +08:00
parent 2e9a803645
commit 4af5430572
17 changed files with 4117 additions and 34 deletions

View File

@@ -1 +0,0 @@
../../../config.yaml

View File

@@ -11,12 +11,10 @@ import (
"github.com/tidwall/gjson"
)
var targetTypeRanking = "openrec_ranking"
var targetTypeUser = "openrec_user"
var openrecRanking *OpenrecRanking
// store 源存储实例, 为存储源数据的实现. 表格具体参考sql/intimate_source.sql
var store *intimate.Store = intimate.NewStore("source_openrec")
var store *intimate.SourceStore = intimate.NewSourceStore(string(intimate.STOpenrec))
func init() {
@@ -67,7 +65,7 @@ func (or *OpenrecRanking) Execute(cxt *hunter.TaskContext) {
data.SetSource(sql.NullString{String: userid, Valid: len(userid) > 0})
data.SetUrl(wf.GetRawURL())
data.SetTargetType(targetTypeUser)
data.SetTargetType(string(intimate.TTOpenrecUser))
store.Insert(data)
}
}