添加tags, 修改 存储结构 更加接近制直播的数据存储架构.
This commit is contained in:
@@ -103,14 +103,6 @@ func TestExtractor(t *testing.T) {
|
||||
ai.SetAnchorId(anchorId)
|
||||
ai.SetPlatform(string(intimate.Popenrec))
|
||||
|
||||
collect.InsertAnchorInfo(ai)
|
||||
|
||||
// if source != nil {
|
||||
// defer store.Restore(source)
|
||||
// }
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
sdata := source.GetExt().([]byte)
|
||||
|
||||
if gjson.ValidBytes(sdata) {
|
||||
@@ -143,9 +135,12 @@ func TestExtractor(t *testing.T) {
|
||||
} else {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
t.Error(source.GetSource())
|
||||
t.Error(anchorName)
|
||||
|
||||
ai.SetAnchorName(anchorName)
|
||||
|
||||
// c-contents
|
||||
xp, err = extractor.XPathResult("//ul[@class='c-contents']//p[@class='c-thumbnailVideo__footer__liveCount']/text()")
|
||||
if err != nil {
|
||||
@@ -233,6 +228,16 @@ func TestExtractor(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
LiveUrl := "https://www.openrec.tv/live/" + anchorId
|
||||
ai.SetLiveUrl(sql.NullString{String: LiveUrl, Valid: true})
|
||||
|
||||
Uid, err := collect.InsertAnchorInfo(ai)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
return
|
||||
}
|
||||
|
||||
clog.SetUid(Uid)
|
||||
clog.SetGratuity(sql.NullInt64{Int64: gratuity, Valid: true})
|
||||
clog.SetPlatform(string(intimate.Popenrec))
|
||||
clog.SetFollowers(sql.NullInt64{Int64: int64(followersInt), Valid: true})
|
||||
|
||||
Reference in New Issue
Block a user