From 213818b6356331a0060b51497badbb9110a688fa Mon Sep 17 00:00:00 2001 From: ikechan8370 Date: Sun, 16 Feb 2025 20:46:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/tools/SerpIkechan8370Tool.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/tools/SerpIkechan8370Tool.js b/utils/tools/SerpIkechan8370Tool.js index f397722..075b059 100644 --- a/utils/tools/SerpIkechan8370Tool.js +++ b/utils/tools/SerpIkechan8370Tool.js @@ -20,7 +20,7 @@ export class SerpIkechan8370Tool extends AbstractTool { func = async function (opts) { let { q, source } = opts if (!source || !['google', 'bing', 'baidu'].includes(source)) { - source = 'bing' + source = 'baidu' } let serpRes = await fetch(`https://serp.ikechan8370.com/${source}?q=${encodeURIComponent(q)}&lang=zh-CN&limit=5`, { headers: { @@ -29,7 +29,7 @@ export class SerpIkechan8370Tool extends AbstractTool { }) serpRes = await serpRes.json() - let res = serpRes.data + let res = serpRes.data || serpRes.results res?.forEach(r => { delete r?.rank })