mirror of
https://github.com/Moe-Sakura/Wrangler-API.git
synced 2026-03-21 05:19:47 +08:00
fix: 修复 VikaACG HTML 响应中的转义双引号处理
* 在处理VikaACG的HTML响应时,增加对转义双引号的正确处理。 * 确保正则表达式能够准确匹配内容,避免因转义字符导致的解析错误。 * 移除调试用的控制台日志输出。
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user