From 786fdfe405acdd4e02f2238d1a43986be243baad Mon Sep 17 00:00:00 2001 From: "lilong.129" Date: Thu, 11 May 2023 19:33:11 +0800 Subject: [PATCH] change: update feed/live found log --- hrp/internal/version/VERSION | 2 +- hrp/pkg/uixt/video_crawler.go | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/hrp/internal/version/VERSION b/hrp/internal/version/VERSION index 0891f9ad..e88d1a3c 100644 --- a/hrp/internal/version/VERSION +++ b/hrp/internal/version/VERSION @@ -1 +1 @@ -v4.3.4-beta-202305111640 \ No newline at end of file +v4.3.4-beta-202305111932 \ No newline at end of file diff --git a/hrp/pkg/uixt/video_crawler.go b/hrp/pkg/uixt/video_crawler.go index 0a642f61..31171079 100644 --- a/hrp/pkg/uixt/video_crawler.go +++ b/hrp/pkg/uixt/video_crawler.go @@ -99,10 +99,7 @@ func (s *VideoStat) incrFeed(ocrResult *OcrResult, driverExt *DriverExt) error { WithRegex(targetLabel.Regex), driverExt.GenAbsScope(scope[0], scope[1], scope[2], scope[3]).Option(), } - if ocrText, err := ocrResult.Texts.FindText(targetLabel.Text, actionOptions...); err == nil { - log.Info().Str("label", targetLabel.Text). - Str("text", ocrText.Text).Msg("found feed success") - + if _, err := ocrResult.Texts.FindText(targetLabel.Text, actionOptions...); err == nil { key := targetLabel.Text if _, ok := s.FeedStat[key]; !ok { s.FeedStat[key] = 0 @@ -123,10 +120,11 @@ func (s *VideoStat) incrFeed(ocrResult *OcrResult, driverExt *DriverExt) error { Favorites: popularityData[2].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++ return nil } @@ -143,10 +141,11 @@ func (s *VideoStat) incrLive(ocrResult *OcrResult, driverExt *DriverExt) error { ocrResult.Popularity = Popularity{ 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++ return nil }