diff --git a/src/libpoketube/libpoketube-core.js b/src/libpoketube/libpoketube-core.js index 221d8a16..afa3b31c 100644 --- a/src/libpoketube/libpoketube-core.js +++ b/src/libpoketube/libpoketube-core.js @@ -20,8 +20,7 @@ const fetcher = require("../libpoketube/libpoketube-fetcher.js"); const getColors = require("get-image-colors"); const wiki = require("wikipedia"); -const sqp = - "-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLBy_x4UUHLNDZtJtH0PXeQGoRFTgw"; +const sqp = "-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLBy_x4UUHLNDZtJtH0PXeQGoRFTgw"; const config = { tubeApi: "https://inner-api.poketube.fun/api/", @@ -184,31 +183,12 @@ async function search(query, cnt) { } async function isvalidvideo(v) { - if (v != "assets") { - var status; - - async function ryd() { - try { - const engagement = await fetch(`${config.dislikes}${v}`).then((res) => - res.json() - ); - return engagement; - } catch {} - } - - if (ryd.status) { - status = await ryd.status(); - } else { - status = "200"; - } - - if (status == 400) { - return false; - } else { + if (v != "assets") { return true; + } else { + return false; } - } -} + } module.exports = { search,