diff --git a/lib/fetcher.js b/lib/fetcher.js index dd31e8d..f0d75ff 100644 --- a/lib/fetcher.js +++ b/lib/fetcher.js @@ -172,13 +172,6 @@ function searchJavdb(id) { { shell: '/bin/bash', timeout: 15000, maxBuffer: 1024 * 1024 * 10 } ).toString(); - // 加这几行调试 - console.error('搜索HTML长度:', searchHtml.length); - const allItems = searchHtml.match(/class="box"/g); - console.error('找到box元素数量:', allItems?.length || 0); - const allStrong = searchHtml.match(/[^<]+<\/strong>/g); - console.error('找到strong元素:', allStrong?.slice(0,5)); - const $ = cheerio.load(searchHtml); let detailPath = null; @@ -206,7 +199,6 @@ function searchJavdb(id) { return parseJavdb(detailHtml, id); } catch { - console.error('JAVDB查询错误:', e.message); return null; } } @@ -271,9 +263,10 @@ function parseJavdb(html, queryId) { // ─── 主入口:依次尝试三个数据源 ───────────────────────── export async function search(id) { - // 自动识别 FC2 格式:031926_100 → FC2-031926 + // 自动识别:FC2 格式 031926_100 → 031926-100(JAVDB的FC2格式) if (/^\d{5,6}_\d+$/.test(id)) { - id = `FC2-${id.split('_')[0]}`; + const parts = id.split('_'); + id = `${parts[0]}-${parts[1]}`; console.log(chalk.gray(` FC2番号已转换为: ${id}`)); } diff --git a/package.json b/package.json index 30ac86e..d0920a0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "javinfo", - "version": "1.1.4", + "version": "1.1.5", "description": "AV番号命令行查询工具", "main": "./index.js", "type": "module",