From d72691f6a472bd86c1fd7f588aa16f6ad8054ce2 Mon Sep 17 00:00:00 2001 From: test Date: Wed, 3 Dec 2025 21:04:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A4=E6=96=ADlocation=E9=9D=9E=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 6 +++++- fetchURLByAndroid720p.js | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index f81b5b9..8a99295 100644 --- a/app.js +++ b/app.js @@ -196,6 +196,10 @@ const server = http.createServer(async (req, res) => { }) const location = obj.headers.get("Location") + + if (location == "" || location == undefined || location == null) { + continue + } if (location.startsWith("http://hlsz")) { resObj.url = location break @@ -279,7 +283,7 @@ server.listen(port, async () => { try { // 初始化数据 - await update(hours) + // await update(hours) } catch (error) { printRed("更新失败") console.log(error) diff --git a/fetchURLByAndroid720p.js b/fetchURLByAndroid720p.js index a88f402..798f45c 100644 --- a/fetchURLByAndroid720p.js +++ b/fetchURLByAndroid720p.js @@ -53,6 +53,11 @@ async function fetchURLByAndroid720p() { }) const location = obj.headers.get("Location") + + + if (location == "" || location == undefined || location == null) { + continue + } if (location.startsWith("http://hlsz")) { resObj.url = location break