From 974f5ee18a4f61ee5433076db8507a40782e2116 Mon Sep 17 00:00:00 2001 From: "lilong.129" Date: Mon, 5 Jun 2023 21:04:42 +0800 Subject: [PATCH] change: update check live video entrance --- hrp/internal/version/VERSION | 2 +- hrp/pkg/uixt/video_crawler.go | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hrp/internal/version/VERSION b/hrp/internal/version/VERSION index 94d22ffc..2eb49042 100644 --- a/hrp/internal/version/VERSION +++ b/hrp/internal/version/VERSION @@ -1 +1 @@ -v4.3.4-beta-2306051133 \ No newline at end of file +v4.3.4-beta-2306052108 \ No newline at end of file diff --git a/hrp/pkg/uixt/video_crawler.go b/hrp/pkg/uixt/video_crawler.go index 9aac58a5..b5847dfe 100644 --- a/hrp/pkg/uixt/video_crawler.go +++ b/hrp/pkg/uixt/video_crawler.go @@ -209,7 +209,8 @@ type LiveCrawler struct { func (l *LiveCrawler) checkLiveVideo(texts OCRTexts) (enterPoint PointF, yes bool) { // 预览流入口:DY/KS - points, err := texts.FindTexts([]string{".*点击进入直播间"}, WithScope(0, 0.3, 1, 0.7), WithRegex(true)) + // 标签文案:点击进入直播间|进入直播间领金币 + points, err := texts.FindTexts([]string{".*进入直播间.*"}, WithScope(0, 0.3, 1, 0.8), WithRegex(true)) if err == nil { return points[0].Center(), true } @@ -222,12 +223,12 @@ func (l *LiveCrawler) checkLiveVideo(texts OCRTexts) (enterPoint PointF, yes boo // 预览流入口:KS/KSLite // 评论框文案:和主播聊聊天...|聊聊天... - points, err = texts.FindTexts([]string{".*聊聊天.*", "更多直播"}, WithRegex(true)) + points, err = texts.FindTexts([]string{".*聊聊天.*"}, WithRegex(true)) if err == nil { point := points[0].Center() enterPoint = PointF{ X: point.X, - Y: point.Y - 100, + Y: point.Y - 300, } return enterPoint, true }