Fix search

This commit is contained in:
ashley 2024-05-18 11:13:17 +00:00
parent 733a99cdc4
commit b47f66773b

View file

@ -190,13 +190,14 @@ module.exports = function (app, config, renderTemplate) {
const { fetch } = await import("undici"); const { fetch } = await import("undici");
const search = await fetch( const search = await fetch(
`https://4get.sudovanilla.com/api/v1/web?s=${query}` `https://4get.sudovanilla.org/api/v1/web?s=${query}`
); );
const web = getJson(await search.text()); const web = getJson(await search.text());
if (req.query.lucky === "true") { if (req.query.lucky === "true") {
res.redirect("/im-feeling-lucky?query=" + query); res.redirect("/im-feeling-lucky?query=" + query);
} }
var uaos = req.useragent.os; var uaos = req.useragent.os;
var IsOldWindows; var IsOldWindows;
@ -268,6 +269,7 @@ module.exports = function (app, config, renderTemplate) {
if (ID.endsWith("@poketube.fun")) { if (ID.endsWith("@poketube.fun")) {
ID = ID.slice(0, -"@poketube.fun".length); ID = ID.slice(0, -"@poketube.fun".length);
} }
const tab = req.query.tab; const tab = req.query.tab;
const cache = {}; const cache = {};