取消对字符$的过滤

This commit is contained in:
develop202
2026-01-16 14:55:12 +08:00
parent b1928a7dbf
commit 58b9de5bae
2 changed files with 11 additions and 8 deletions

View File

@@ -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) {

View File

@@ -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
})