change: update check live video entrance

This commit is contained in:
lilong.129
2023-06-05 21:04:42 +08:00
parent 664a12a207
commit 974f5ee18a
2 changed files with 5 additions and 4 deletions

View File

@@ -1 +1 @@
v4.3.4-beta-2306051133
v4.3.4-beta-2306052108

View File

@@ -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
}