TODO: extractor 的重构.
This commit is contained in:
@@ -143,8 +143,8 @@ func (oer *OpenrecExtratorRanking) Execute(cxt *hunter.TaskContext) {
|
||||
// cookies := cxt.Session().GetCookies(wf.GetParsedURL())
|
||||
ext := make(map[string]interface{})
|
||||
|
||||
ext["supporters"] = supporters
|
||||
ext["user"] = string(resp.Content())
|
||||
ext["html_supporters"] = supporters
|
||||
ext["html_user"] = string(resp.Content())
|
||||
|
||||
liveUrl := updateUrl["live"]
|
||||
tp = cxt.Session().Get(liveUrl)
|
||||
@@ -154,7 +154,8 @@ func (oer *OpenrecExtratorRanking) Execute(cxt *hunter.TaskContext) {
|
||||
estore.UpdateError(streamer, err)
|
||||
continue
|
||||
}
|
||||
ext["live"] = string(resp.Content())
|
||||
ext["html_live"] = string(resp.Content())
|
||||
ext["var_user_id"] = userId
|
||||
|
||||
extJsonBytes, err := json.Marshal(ext)
|
||||
if err != nil {
|
||||
@@ -168,6 +169,7 @@ func (oer *OpenrecExtratorRanking) Execute(cxt *hunter.TaskContext) {
|
||||
source := &intimate.Source{}
|
||||
source.TargetType = string(intimate.TTOpenrecUser)
|
||||
source.Ext = string(extJsonBytes)
|
||||
source.StreamerId = sql.NullInt64{Int64: streamer.Uid, Valid: true}
|
||||
sstore.Insert(source)
|
||||
|
||||
estore.UpdateOperator(streamer)
|
||||
|
||||
Reference in New Issue
Block a user