mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-10 07:38:24 +01:00
Update server.js
This commit is contained in:
parent
aec72f8d03
commit
10b4ce2b99
1 changed files with 4 additions and 0 deletions
|
@ -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 bout = await fetch( `https://tube.kuylar.dev/api/channel?id=${ID}&tab=about`);
|
||||||
const h = await bout.text();
|
const h = await bout.text();
|
||||||
const k = JSON.parse(toJson(h));
|
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;
|
const { Subscribers: subscribers } = k.Channel.Metadata;
|
||||||
renderTemplate(res, req, "channel.ejs", {
|
renderTemplate(res, req, "channel.ejs", {
|
||||||
ID:ID,
|
ID:ID,
|
||||||
j:k,
|
j:k,
|
||||||
|
tj:tj,
|
||||||
about:k.Channel.Contents.ItemSection.About,
|
about:k.Channel.Contents.ItemSection.About,
|
||||||
subs:typeof subscribers === 'string' ? subscribers.replace('subscribers', '') : 'Private',
|
subs:typeof subscribers === 'string' ? subscribers.replace('subscribers', '') : 'Private',
|
||||||
desc:k.Channel.Contents.ItemSection.About.Description
|
desc:k.Channel.Contents.ItemSection.About.Description
|
||||||
|
|
Loading…
Reference in a new issue