diff --git a/fetchURLByzbpro.js b/fetchURLByzbpro.js index 2389e12..5317594 100644 --- a/fetchURLByzbpro.js +++ b/fetchURLByzbpro.js @@ -13,15 +13,17 @@ printMagenta("开始更新接口文件...") const updateResult = await updateChannels() switch (updateResult) { case 1: - printGreen(`数据已是最新,无需更新`) - process.exit(0) + printGreen(`接口数据已是最新,无需更新`) + // process.exit(0) + break case 2: - printRed(`请求失败`) - process.exit(1) + printRed(`接口请求失败`) + // process.exit(1) + break default: + printGreen("接口文件更新完成!") break; } -printGreen("接口文件更新完成!") // 6小时更新节目单 if (start.getHours() % 6) { diff --git a/utils/zbpro.js b/utils/zbpro.js index 0781554..6dbdca3 100644 --- a/utils/zbpro.js +++ b/utils/zbpro.js @@ -91,14 +91,15 @@ async function getAllURL() { } for (const url of channel?.urls) { i += 1 - const decryptURL = AESdecrypt(url) + let decryptURL = AESdecrypt(url) if (!decryptURL.startsWith("http")) { // printYellow(`${i} ${channel?.title} 格式错误, 过滤`) continue } if (decryptURL.indexOf("$") != -1) { // printYellow(`${i} ${channel?.title} 存在特殊字符, 过滤`) - continue + // continue + decryptURL = decryptURL.split("$")[0] } const domain = decryptURL.split("/")[2] // 不在域名白名单 @@ -108,7 +109,7 @@ async function getAllURL() { const timeoutId = setTimeout(() => { controller.abort() // console.log("请求超时") - }, 500); + }, 300); const test = await fetch(decryptURL, { signal: controller.signal })