From 9c8f2c9ac41b45306cf9c8e520db7775c82fa475 Mon Sep 17 00:00:00 2001 From: thzxx Date: Wed, 10 Jun 2026 18:13:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=E6=AD=A3=E5=88=99?= =?UTF-8?q?=E5=89=8D=E7=9E=BB=E6=96=AD=E8=A8=80(=3F=3D)=20=E2=80=94=20Go?= =?UTF-8?q?=20regexp=E4=B8=8D=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- search-proxy/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/search-proxy/main.go b/search-proxy/main.go index b39946b..8312d87 100644 --- a/search-proxy/main.go +++ b/search-proxy/main.go @@ -128,7 +128,7 @@ func cleanCacheLoop(interval time.Duration) { // ── 正则预编译(全局,避免每次搜索重新编译)── var ( - reGoogleBlock = regexp.MustCompile(`<(?:div|li)[^>]*class="[^"]*(?:Gx5Zad|g|kvH3mc)[^"]*"[^>]*>([\s\S]*?)(?=<(?:div|li)[^>]*class="[^"]*(?:Gx5Zad|kvH3mc)[^"]*"|<(?:div|g-section)|\z)`) + reGoogleBlock = regexp.MustCompile(`<(?:div|li)[^>]*class="[^"]*(?:Gx5Zad|g|kvH3mc)[^"]*"[^>]*>([\s\S]*?)`) reGoogleTitle = regexp.MustCompile(`]*href="(https?://[^"]*)"[^>]*>[\s\S]*?]*>([\s\S]*?)`) reGoogleSnip = regexp.MustCompile(`<(?:div|span)[^>]*(?:data-sncf|class="[^"]*(?:VwiC3b|st|lWMagT)[^"]*")[^>]*>([\s\S]*?)`)