mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-26 13:58:13 +01:00
remov isvalidvideo as its not needed anymore :3
This commit is contained in:
parent
0097e161ff
commit
624454c134
1 changed files with 5 additions and 25 deletions
|
@ -20,8 +20,7 @@ const fetcher = require("../libpoketube/libpoketube-fetcher.js");
|
||||||
const getColors = require("get-image-colors");
|
const getColors = require("get-image-colors");
|
||||||
|
|
||||||
const wiki = require("wikipedia");
|
const wiki = require("wikipedia");
|
||||||
const sqp =
|
const sqp = "-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLBy_x4UUHLNDZtJtH0PXeQGoRFTgw";
|
||||||
"-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLBy_x4UUHLNDZtJtH0PXeQGoRFTgw";
|
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
tubeApi: "https://inner-api.poketube.fun/api/",
|
tubeApi: "https://inner-api.poketube.fun/api/",
|
||||||
|
@ -185,30 +184,11 @@ async function search(query, cnt) {
|
||||||
|
|
||||||
async function isvalidvideo(v) {
|
async function isvalidvideo(v) {
|
||||||
if (v != "assets") {
|
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 {
|
|
||||||
return true;
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
search,
|
search,
|
||||||
|
|
Loading…
Reference in a new issue