change: update check live video entrance

This commit is contained in:
lilong.129
2023-06-05 21:08:31 +08:00
parent 664a12a207
commit 974f5ee18a
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -1 +1 @@
v4.3.4-beta-2306051133 v4.3.4-beta-2306052108
+4 -3
View File
@@ -209,7 +209,8 @@ type LiveCrawler struct {
func (l *LiveCrawler) checkLiveVideo(texts OCRTexts) (enterPoint PointF, yes bool) { func (l *LiveCrawler) checkLiveVideo(texts OCRTexts) (enterPoint PointF, yes bool) {
// 预览流入口:DY/KS // 预览流入口: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 { if err == nil {
return points[0].Center(), true return points[0].Center(), true
} }
@@ -222,12 +223,12 @@ func (l *LiveCrawler) checkLiveVideo(texts OCRTexts) (enterPoint PointF, yes boo
// 预览流入口:KS/KSLite // 预览流入口:KS/KSLite
// 评论框文案:和主播聊聊天...|聊聊天... // 评论框文案:和主播聊聊天...|聊聊天...
points, err = texts.FindTexts([]string{".*聊聊天.*", "更多直播"}, WithRegex(true)) points, err = texts.FindTexts([]string{".*聊聊天.*"}, WithRegex(true))
if err == nil { if err == nil {
point := points[0].Center() point := points[0].Center()
enterPoint = PointF{ enterPoint = PointF{
X: point.X, X: point.X,
Y: point.Y - 100, Y: point.Y - 300,
} }
return enterPoint, true return enterPoint, true
} }