Temporary debugging+3
This commit is contained in:
1 parent
5425fa5007
commit
3344741510
1 file changed
+5
-2
+5
-2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user