diff --git a/lib/fetcher.js b/lib/fetcher.js index f0d75ff..60037dd 100644 --- a/lib/fetcher.js +++ b/lib/fetcher.js @@ -263,10 +263,9 @@ function parseJavdb(html, queryId) { // ─── 主入口:依次尝试三个数据源 ───────────────────────── export async function search(id) { - // 自动识别:FC2 格式 031926_100 → 031926-100(JAVDB的FC2格式) - if (/^\d{5,6}_\d+$/.test(id)) { - const parts = id.split('_'); - id = `${parts[0]}-${parts[1]}`; + // 自动识别:用户输入连字符FC2格式 031926-100 → 转换为下划线格式 031926_100(JAVDB的FC2格式) + if (/^\d{5,6}-\d+$/.test(id)) { + id = id.replace('-', '_'); console.log(chalk.gray(` FC2番号已转换为: ${id}`)); } diff --git a/package.json b/package.json index d0920a0..d71a378 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "javinfo", - "version": "1.1.5", + "version": "1.1.6", "description": "AV番号命令行查询工具", "main": "./index.js", "type": "module",