load 优化

This commit is contained in:
tangly1024.com
2023-12-01 13:48:54 +08:00
parent 3b181f3069
commit 65a47af7a6

View File

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