From 0df3799e4dabe8d2ec8a49a0984f8fa9da8ce13b Mon Sep 17 00:00:00 2001 From: "lilong.129" Date: Thu, 7 Sep 2023 23:34:20 +0800 Subject: [PATCH] fix: logs --- hrp/pkg/uixt/video_crawler.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hrp/pkg/uixt/video_crawler.go b/hrp/pkg/uixt/video_crawler.go index eaba59dc..63dbb478 100644 --- a/hrp/pkg/uixt/video_crawler.go +++ b/hrp/pkg/uixt/video_crawler.go @@ -138,9 +138,9 @@ func (vc *VideoCrawler) startLiveCrawler(enterPoint PointF) error { liveRoom, err := vc.getCurrentVideo() if err != nil || liveRoom.Type != VideoType_Live { - if vc.failedCount >= 5 { - // failed 5 consecutive times - return errors.New("get current live event trackings failed 5 consecutive times") + if vc.failedCount >= 3 { + // failed 3 consecutive times + return errors.New("get current live event trackings failed 3 consecutive times") } // retry vc.failedCount++ @@ -342,9 +342,6 @@ func (dExt *DriverExt) VideoCrawler(configs *VideoCrawlerConfigs) (err error) { // simulation watch feed video sleepStrict(swipeFinishTime, screenResult.Video.PlayDuration) - - log.Warn().Interface("video", feedVideo). - Msg("get unexpected video type") } screenResult.TotalElapsed = time.Since(swipeFinishTime).Milliseconds() @@ -436,6 +433,7 @@ func (vc *VideoCrawler) getCurrentVideo() (video *Video, err error) { } log.Info(). + Str("type", string(video.Type)). Interface("userName", video.UserName). Msg("get current video success") return video, nil