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