From 10b4ce2b99d7f52d1988cc9ad03e98c205cebd6c Mon Sep 17 00:00:00 2001 From: Ashley Date: Wed, 22 Jun 2022 23:56:42 +0300 Subject: [PATCH] Update server.js --- server.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server.js b/server.js index 8469cb4d..8a14c560 100644 --- a/server.js +++ b/server.js @@ -119,10 +119,14 @@ app.get("/channel", async (req, res) => { const bout = await fetch( `https://tube.kuylar.dev/api/channel?id=${ID}&tab=about`); const h = await bout.text(); const k = JSON.parse(toJson(h)); + const channel = await fetch( `https://tube.kuylar.dev/api/channel?id=${ID}&tab=videos`); + const c = await channel.text(); + const tj = JSON.parse(toJson(c)); const { Subscribers: subscribers } = k.Channel.Metadata; renderTemplate(res, req, "channel.ejs", { ID:ID, j:k, + tj:tj, about:k.Channel.Contents.ItemSection.About, subs:typeof subscribers === 'string' ? subscribers.replace('subscribers', '') : 'Private', desc:k.Channel.Contents.ItemSection.About.Description