mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-28 17:29:02 +01:00
add != "assets"
This commit is contained in:
parent
bf575e0340
commit
4763dd18d8
1 changed files with 49 additions and 43 deletions
|
@ -81,14 +81,17 @@ async function video(v) {
|
|||
|
||||
var vid = await getJson(video_new_info);
|
||||
if (checkUnexistingObject(vid)) {
|
||||
|
||||
const a = await fetch(`${config.tubeApi}channel?id=${vid.authorId}&tab=about`)
|
||||
const a = await fetch(
|
||||
`${config.tubeApi}channel?id=${vid.authorId}&tab=about`
|
||||
)
|
||||
.then((res) => res.text())
|
||||
.then((xml) => getJson(toJson(xml)));
|
||||
|
||||
const summary = await wiki
|
||||
.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;
|
||||
|
||||
|
@ -128,7 +131,9 @@ async function search(query, cnt) {
|
|||
}
|
||||
|
||||
async function isvalidvideo(v) {
|
||||
if (v != "assets") {
|
||||
var status;
|
||||
|
||||
const vld = await fetch(`${config.dislikes}${v}`).then((res) => {
|
||||
status = res.status;
|
||||
return res.json();
|
||||
|
@ -140,6 +145,7 @@ async function isvalidvideo(v) {
|
|||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
search,
|
||||
|
|
Loading…
Reference in a new issue