mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-06 15:01:22 +08:00
change: update feed/live found log
This commit is contained in:
@@ -1 +1 @@
|
|||||||
v4.3.4-beta-202305111640
|
v4.3.4-beta-202305111932
|
||||||
@@ -99,10 +99,7 @@ func (s *VideoStat) incrFeed(ocrResult *OcrResult, driverExt *DriverExt) error {
|
|||||||
WithRegex(targetLabel.Regex),
|
WithRegex(targetLabel.Regex),
|
||||||
driverExt.GenAbsScope(scope[0], scope[1], scope[2], scope[3]).Option(),
|
driverExt.GenAbsScope(scope[0], scope[1], scope[2], scope[3]).Option(),
|
||||||
}
|
}
|
||||||
if ocrText, err := ocrResult.Texts.FindText(targetLabel.Text, actionOptions...); err == nil {
|
if _, err := ocrResult.Texts.FindText(targetLabel.Text, actionOptions...); err == nil {
|
||||||
log.Info().Str("label", targetLabel.Text).
|
|
||||||
Str("text", ocrText.Text).Msg("found feed success")
|
|
||||||
|
|
||||||
key := targetLabel.Text
|
key := targetLabel.Text
|
||||||
if _, ok := s.FeedStat[key]; !ok {
|
if _, ok := s.FeedStat[key]; !ok {
|
||||||
s.FeedStat[key] = 0
|
s.FeedStat[key] = 0
|
||||||
@@ -123,10 +120,11 @@ func (s *VideoStat) incrFeed(ocrResult *OcrResult, driverExt *DriverExt) error {
|
|||||||
Favorites: popularityData[2].Text,
|
Favorites: popularityData[2].Text,
|
||||||
Shares: popularityData[3].Text,
|
Shares: popularityData[3].Text,
|
||||||
}
|
}
|
||||||
log.Info().Interface("popularity", ocrResult.Popularity).
|
|
||||||
Msg("found feed popularity success")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Info().Strs("tags", ocrResult.Tags).
|
||||||
|
Interface("popularity", ocrResult.Popularity).
|
||||||
|
Msg("found feed success")
|
||||||
s.FeedCount++
|
s.FeedCount++
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@@ -143,10 +141,11 @@ func (s *VideoStat) incrLive(ocrResult *OcrResult, driverExt *DriverExt) error {
|
|||||||
ocrResult.Popularity = Popularity{
|
ocrResult.Popularity = Popularity{
|
||||||
LiveUsers: popularityData[0].Text,
|
LiveUsers: popularityData[0].Text,
|
||||||
}
|
}
|
||||||
log.Info().Interface("popularity", ocrResult.Popularity).
|
|
||||||
Msg("found live popularity success")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Info().Strs("tags", ocrResult.Tags).
|
||||||
|
Interface("popularity", ocrResult.Popularity).
|
||||||
|
Msg("found live success")
|
||||||
s.LiveCount++
|
s.LiveCount++
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user