change: update check live video entrance

This commit is contained in:
lilong.129
2023-06-05 10:54:12 +08:00
parent b81903ab5e
commit f6594c1609
2 changed files with 11 additions and 4 deletions

View File

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

View File

@@ -209,13 +209,20 @@ type LiveCrawler struct {
func (l *LiveCrawler) checkLiveVideo(texts OCRTexts) (enterPoint PointF, yes bool) {
// 预览流入口DY/KS
points, err := texts.FindTexts([]string{".*点击进入直播间"}, WithRegex(true))
points, err := texts.FindTexts([]string{".*点击进入直播间"}, WithScope(0, 0.3, 1, 0.7), WithRegex(true))
if err == nil {
return points[0].Center(), true
}
// 标签文案:直播中|直播卖货|直播团购
points, err = texts.FindTexts([]string{"直播中|直播卖货|直播团购"},
WithScope(0, 0.7, 0.5, 1), WithRegex(true))
if err == nil {
return points[0].Center(), true
}
// 预览流入口KS
points, err = texts.FindTexts([]string{"和主播聊聊天.*"}, WithRegex(true))
// 预览流入口KS/KSLite
// 评论框文案:和主播聊聊天...|聊聊天...
points, err = texts.FindTexts([]string{".*聊聊天.*", "更多直播"}, WithRegex(true))
if err == nil {
point := points[0].Center()
enterPoint = PointF{