change the url lol

This commit is contained in:
Ashley //// 2024-02-29 20:00:24 +00:00
parent 13a37b7b69
commit bdec2c7517

View file

@ -176,13 +176,10 @@ module.exports = function (app, config, renderTemplate) {
const { fetch } = await import("undici"); const { fetch } = await import("undici");
let allResults = []; const search = await fetch(
`https://librex.uk.to/api.php?q=${query}&p=1&t=0`
for (let page = 1; page <= 3; page++) { );
const search = await fetch(`https://search.zeroish.xyz/api.php?q=${query}&p=${page}&t=0`); const web = getJson(await search.text());
const results = await search.json();
allResults = allResults.concat(results);
}
if (req.query.lucky === "true") { if (req.query.lucky === "true") {
res.redirect("/im-feeling-lucky?query=" + query); res.redirect("/im-feeling-lucky?query=" + query);
@ -221,7 +218,7 @@ module.exports = function (app, config, renderTemplate) {
let continuation = req.query.continuation || ""; let continuation = req.query.continuation || "";
try { try {
const results = allResults; const results = web;
renderTemplate(res, req, "search-web.ejs", { renderTemplate(res, req, "search-web.ejs", {
j: "", j: "",