From 334474151052c9039b8c179e983bdc608cd61ef3 Mon Sep 17 00:00:00 2001 From: gdjdkid <67935269+gdjdkid@users.noreply.github.com> Date: Sat, 21 Mar 2026 14:09:50 +0800 Subject: [PATCH] Temporary debugging+3 --- lib/fetcher.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/fetcher.js b/lib/fetcher.js index 79120d9..5fd738e 100644 --- a/lib/fetcher.js +++ b/lib/fetcher.js @@ -150,7 +150,7 @@ function searchJavlibrary(id) { } // ─── 数据源三:JAVDB(需要Cookie) ────────────────────── -function searchJavdb(id) { +async function searchJavdb(id) { try { const config = getConfig(); if (!config.session) return null; @@ -197,6 +197,9 @@ function searchJavdb(id) { if (!detailPath) return null; console.error('找到detailPath:', detailPath); // 加这行 + // 加这一行,等待 2 秒再请求详情页 + await new Promise(resolve => setTimeout(resolve, 2000)); + const detailHtml = execSync( `curl -sL "https://javdb.com${detailPath}" \ -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36" \ @@ -304,7 +307,7 @@ export async function search(id) { } // 第三优先:JAVDB - result = searchJavdb(id); + result = await searchJavdb(id); if (result) { setCache(id, result); return result;