From 65a47af7a6785d79f97c11250170592d49390849 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Fri, 1 Dec 2023 13:48:54 +0800 Subject: [PATCH] =?UTF-8?q?load=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/utils.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/utils.js b/lib/utils.js index 18e50535..8c2057e6 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -17,7 +17,9 @@ export const isSearchEngineBot = () => { } // 获取用户代理字符串 const userAgent = navigator.userAgent; - const isEngine = /Googlebot|bingbot|Baidu/.test(userAgent); + const isEngine = /Googlebot|bingbot|Baidu/.test(userAgent) || + userAgent === 'u-a Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36' || + userAgent === 'u-a Mozilla/5.0 (Linux; Android 11; moto g power (2022)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Mobile Safari/537.36' if (isEngine) { console.warn('爬虫', userAgent)