also remove yandere code :3

This commit is contained in:
Ashley 2022-12-24 10:49:52 +00:00
parent eb41e742d3
commit 99d4b80f43

View file

@ -119,10 +119,7 @@ module.exports = function (app, config, renderTemplate) {
let url; let url;
if (j_.URL != undefined) url = j_.URL; if (j_.URL != undefined) url = j_.URL;
if (json) { if ("Title" in json) {
if (json.Title) {
if (json.Channel.Name) {
if (json.Description) {
// json response // json response
const re = { const re = {
main: { main: {
@ -139,9 +136,6 @@ module.exports = function (app, config, renderTemplate) {
res.json(re); res.json(re);
} }
}
}
}
}); });
app.get("/watch", async function (req, res) { app.get("/watch", async function (req, res) {
@ -164,19 +158,20 @@ module.exports = function (app, config, renderTemplate) {
const info = await modules.fetch("http://ip-api.com/json/"); const info = await modules.fetch("http://ip-api.com/json/");
const jj = await info.text(); const jj = await info.text();
const ip = JSON.parse(jj); const ip = JSON.parse(jj);
const isvld = await core.isvalidvideo(v); const isvld = await core.isvalidvideo(v);
if (isvld) { if (isvld) {
core.video(v).then((data) => { core.video(v).then((data) => {
if (data) { if (data) {
if (data.video) { if ("video" in data) {
const k = data.video; const k = data.video;
const json = data.json; const json = data.json;
const engagement = data.engagement; const engagement = data.engagement;
var inv_comments = data.comments; var inv_comments = data.comments;
const inv_vid = data.vid; const inv_vid = data.vid;
if (json) {
if (json.Title) { if ("Title" in json) {
if (!data.comments) inv_comments = "Disabled"; if (!data.comments) inv_comments = "Disabled";
if (!core.video(v).b) { if (!core.video(v).b) {
@ -192,6 +187,7 @@ module.exports = function (app, config, renderTemplate) {
} }
const desc = data.desc; const desc = data.desc;
if (d) { if (d) {
var d = desc.toString().replace(/\n/g, " <br> "); var d = desc.toString().replace(/\n/g, " <br> ");
} }
@ -231,7 +227,6 @@ module.exports = function (app, config, renderTemplate) {
}); });
} }
} }
}
} else { } else {
res.redirect("/"); res.redirect("/");
} }