1
Fork 0

add != "assets"

This commit is contained in:
Ashley 2022-12-18 14:11:24 +00:00
parent 6e9abcf324
commit c66863e69a

View file

@ -81,14 +81,17 @@ async function video(v) {
var vid = await getJson(video_new_info); var vid = await getJson(video_new_info);
if (checkUnexistingObject(vid)) { if (checkUnexistingObject(vid)) {
const a = await fetch(
const a = await fetch(`${config.tubeApi}channel?id=${vid.authorId}&tab=about`) `${config.tubeApi}channel?id=${vid.authorId}&tab=about`
)
.then((res) => res.text()) .then((res) => res.text())
.then((xml) => getJson(toJson(xml))); .then((xml) => getJson(toJson(xml)));
const summary = await wiki const summary = await wiki
.summary(vid.author + " ") .summary(vid.author + " ")
.then((summary_) => (summary_.title !== "Not found." ? summary_ : "none")); .then((summary_) =>
summary_.title !== "Not found." ? summary_ : "none"
);
const desc = a.Channel?.Contents.ItemSection.About.Description; const desc = a.Channel?.Contents.ItemSection.About.Description;
@ -128,7 +131,9 @@ async function search(query, cnt) {
} }
async function isvalidvideo(v) { async function isvalidvideo(v) {
if (v != "assets") {
var status; var status;
const vld = await fetch(`${config.dislikes}${v}`).then((res) => { const vld = await fetch(`${config.dislikes}${v}`).then((res) => {
status = res.status; status = res.status;
return res.json(); return res.json();
@ -140,6 +145,7 @@ async function isvalidvideo(v) {
return true; return true;
} }
} }
}
module.exports = { module.exports = {
search, search,