From 14f0aea33d2fa23f5b16d521c459eec2ff56947d Mon Sep 17 00:00:00 2001 From: aka paul <50n50@noreply.localhost> Date: Wed, 25 Mar 2026 16:45:27 +0000 Subject: [PATCH] Update animekai/animekai.js --- animekai/animekai.js | 65 ++++++++++++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 21 deletions(-) diff --git a/animekai/animekai.js b/animekai/animekai.js index 7550ae4..03b4ec8 100644 --- a/animekai/animekai.js +++ b/animekai/animekai.js @@ -13,7 +13,7 @@ async function searchResults(query) { try { const encodedQuery = encodeQuery(query); const searchUrl = searchBaseUrl + encodedQuery; - const response = await fetchv2("https://deno-proxies-sznvnpnxwhbv.deno.dev/?url=" + encodeURIComponent(searchUrl)); + const response = await fetchv2(searchUrl); const htmlText = await response.text(); const results = []; @@ -30,7 +30,9 @@ async function searchResults(query) { null; const imageMatch = imageMatches[index].match(extractImageRegex); - const imageSrc = imageMatch ? imageMatch[1] : null; + const imageSrc = imageMatch + ? (imageMatch[1].startsWith("http") ? imageMatch[1] : baseUrl + imageMatch[1]) + : null; const titleMatch = titleMatches[index].match(extractTitleRegex); const cleanTitle = titleMatch ? @@ -40,7 +42,7 @@ async function searchResults(query) { if (fullHref && imageSrc && cleanTitle) { results.push({ href: fullHref, - image: "https://deno-proxies-sznvnpnxwhbv.deno.dev/?url=" + encodeURIComponent(imageSrc), + image: imageSrc, title: cleanTitle }); } @@ -58,9 +60,8 @@ async function searchResults(query) { async function extractDetails(url) { try { - const response = await fetchv2("https://deno-proxies-sznvnpnxwhbv.deno.dev/?url=" + encodeURIComponent(url)); + const response = await fetchv2(url); const htmlText = await response.text(); - console.log(htmlText); const descriptionMatch = (/