comments :3

This commit is contained in:
Ashley 2022-09-04 11:00:51 +02:00
parent 651f1326ea
commit b1ea23ebd9

View file

@ -35,11 +35,7 @@ var express = require("express");
var useragent = require("express-useragent"); var useragent = require("express-useragent");
// hash // hash
var sha512 = require("js-sha512").sha512; const sha384 = require("js-sha512").sha384;
var sha384 = require("js-sha512").sha384;
var sha512_256 = require("js-sha512").sha512_256;
var sha512_224 = require("js-sha512").sha512_224;
const musicInfo = require("music-info"); const musicInfo = require("music-info");
@ -172,13 +168,13 @@ app.get("/watch", async function (req, res) {
var nn = ""; var nn = "";
if (n === null) { var badges = ""
nn = ""; if (n === undefined) {badges = "";}
} if (n !== undefined) {badges = JSON.parse(n).channel.badges[0]}
if (n) { var comments = ""
nn = JSON.parse(n); if (n === undefined) { comments = ""; }
} if (n !== undefined) { comments = JSON.parse(n).commentCount }
var fetching = await fetcher(v); var fetching = await fetcher(v);
@ -234,7 +230,8 @@ app.get("/watch", async function (req, res) {
f: f, f: f,
t: config.t_url, t: config.t_url,
optout: t, optout: t,
nigth:nn, badges:badges,
comments:comments,
lyrics: "", lyrics: "",
}); });
}); });