From 320381fe89e20b826218353308bc829d1a33a0f9 Mon Sep 17 00:00:00 2001 From: Ashley Date: Tue, 7 Nov 2023 04:07:18 +0000 Subject: [PATCH] add new url --- p/server.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/p/server.js b/p/server.js index ca036265..935a76c5 100644 --- a/p/server.js +++ b/p/server.js @@ -62,7 +62,7 @@ const proxy = async (req, res) => { let url; try { - url = new URL("https://" + req.originalUrl.slice(10)); + url = new URL("https://" + req.originalUrl.slice(8)); } catch (e) { console.log("==> Cannot parse URL: " + e); return res.status(400).send("Malformed URL"); @@ -105,6 +105,7 @@ app.get("/", (req, res) => { const apiUrls = [ "https://returnyoutubedislikeapi.com/votes?videoId=", "https://ipv6-t.poketube.fun/api?v=", + "https://prod-poketube.testing.poketube.fun/api?v=" ]; // Define a cache object @@ -142,6 +143,7 @@ app.get("/api", async (req, res) => { // Log the error for this URL and continue to the next URL console.log(`Error fetching data from ${apiUrl}: ${err.message}`); errors.push(err.message); + return ""; } }