fix: 修复 VikaACG HTML 响应中的转义双引号处理

*   在处理VikaACG的HTML响应时,增加对转义双引号的正确处理。
*   确保正则表达式能够准确匹配内容,避免因转义字符导致的解析错误。
*   移除调试用的控制台日志输出。
This commit is contained in:
Jurangren
2025-08-23 02:34:19 +08:00
parent 90e047aae8
commit 9015c54201

View File

@@ -49,13 +49,7 @@ async function searchVikaACG(game: string): Promise<PlatformSearchResult> {
// .json() will parse the JSON and unescape the string content.
const html: string = await response.text();
const matches = html.replaceAll('\\/', '/').replaceAll('\\\\', '\\').matchAll(REGEX);
console.log(JSON.stringify({
message: "VikaACG API HTML Response",
html: html.replaceAll('\\/', '/').replaceAll('\\\\', '\\'),
level: "info",
}));
const matches = html.replaceAll('\\/', '/').replaceAll('\\\\', '\\').replaceAll('\\"', '"').matchAll(REGEX);
const items: SearchResultItem[] = [];
for (const match of matches) {