From 3e98c074da94103d246909a955cdf713b7b93fb9 Mon Sep 17 00:00:00 2001 From: aka paul <50n50@noreply.localhost> Date: Sun, 28 Dec 2025 14:04:15 +0000 Subject: [PATCH] Update ashi/ashi.js --- ashi/ashi.js | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/ashi/ashi.js b/ashi/ashi.js index 3604212..1c9c029 100644 --- a/ashi/ashi.js +++ b/ashi/ashi.js @@ -140,8 +140,8 @@ async function searchResults(query) { }; const animekaiSearch = async () => { - const searchBaseUrl = "https://animekai.to/browser?keyword="; - const baseUrl = "https://animekai.to"; + const searchBaseUrl = "https://anikai.to/browser?keyword="; + const baseUrl = "https://anikai.to"; const posterHrefRegex = /href="[^"]*" class="poster"/g; const titleRegex = /class="title"[^>]*title="[^"]*"/g; @@ -187,7 +187,7 @@ async function searchResults(query) { `${searchBaseUrl}${encodedQuery}&page=3` ]; - const responses = await Promise.all(urls.map(url => fetchv2(url))); + const responses = await Promise.all(urls.map(url => fetchv2("https://deno-proxies-sznvnpnxwhbv.deno.dev/?url=" + encodeURIComponent(url)))); const htmlTexts = await Promise.all(responses.map(res => res.text())); const allResults = []; @@ -234,7 +234,7 @@ async function searchResults(query) { `${searchBaseUrl}${encodedQuery}&page=3` ]; - const responses = await Promise.all(urls.map(url => fetchv2(url))); + const responses = await Promise.all(urls.map(url => fetchv2("https://deno-proxies-sznvnpnxwhbv.deno.dev/?url=" + encodeURIComponent(url)))); const htmlTexts = await Promise.all(responses.map(res => res.text())); const allResults = []; @@ -284,7 +284,7 @@ async function extractDetails(url) { const actualUrl = url.replace("Animekai:", "").trim(); try { - const response = await fetchv2(actualUrl); + const response = await fetchv2("https://deno-proxies-sznvnpnxwhbv.deno.dev/?url=" + encodeURIComponent(actualUrl)); const htmlText = await response.text(); const descriptionMatch = (/
([\s\S]*?)<\/div>/.exec(htmlText) || [])[1]; @@ -305,7 +305,7 @@ async function extractDetails(url) { } } else { try { - const response = await fetchv2(url); + const response = await fetchv2("https://deno-proxies-sznvnpnxwhbv.deno.dev/?url=" + encodeURIComponent(url)); const htmlText = await response.text(); const descriptionMatch = (/
([\s\S]*?)<\/div>/.exec(htmlText) || [])[1]; @@ -332,7 +332,7 @@ async function extractEpisodes(url) { try { if (url.startsWith("Animekai:")) { const actualUrl = url.replace("Animekai:", "").trim(); - const htmlText = await (await fetchv2(actualUrl)).text(); + const htmlText = await (await fetchv2("https://deno-proxies-sznvnpnxwhbv.deno.dev/?url=" + encodeURIComponent(actualUrl))).text(); const animeIdMatch = (htmlText.match(/
]*data-id="([^"]+)"/) || [])[1]; if (!animeIdMatch) return JSON.stringify([{ error: "AniID not found" }]); @@ -340,8 +340,8 @@ async function extractEpisodes(url) { const tokenData = await tokenResponse.json(); const token = tokenData.result; - const episodeListUrl = `https://animekai.to/ajax/episodes/list?ani_id=${animeIdMatch}&_=${token}`; - const episodeListData = await (await fetchv2(episodeListUrl)).json(); + const episodeListUrl = `https://anikai.to/ajax/episodes/list?ani_id=${animeIdMatch}&_=${token}`; + const episodeListData = await (await fetchv2("https://deno-proxies-sznvnpnxwhbv.deno.dev/?url=" + encodeURIComponent(episodeListUrl))).json(); const cleanedHtml = cleanJsonHtml(episodeListData.result); const episodeRegex = /]+num="([^"]+)"[^>]+token="([^"]+)"[^>]*>/g; @@ -349,12 +349,12 @@ async function extractEpisodes(url) { const episodes = episodeMatches.map(([_, episodeNum, episodeToken]) => ({ number: parseInt(episodeNum, 10), - href: `Animekai:https://animekai.to/ajax/links/list?token=${episodeToken}&_=ENCRYPT_ME` + href: `Animekai:https://anikai.to/ajax/links/list?token=${episodeToken}&_=ENCRYPT_ME` })); return JSON.stringify(episodes); } else { - const htmlText = await (await fetchv2(url)).text(); + const htmlText = await (await fetchv2("https://deno-proxies-sznvnpnxwhbv.deno.dev/?url=" + encodeURIComponent(url))).text(); const movieIDMatch = (htmlText.match(/
]*id="movie-rating"[^>]*data-id="([^"]+)"/) || [])[1]; if (!movieIDMatch) return JSON.stringify([{ error: "MovieID not found" }]); @@ -363,7 +363,7 @@ async function extractEpisodes(url) { const token = temp.result; const episodeListUrl = `https://1movies.bz/ajax/episodes/list?id=${movieIDMatch}&_=${token}`; - const episodeListData = await (await fetchv2(episodeListUrl)).json(); + const episodeListData = await (await fetchv2("https://deno-proxies-sznvnpnxwhbv.deno.dev/?url=" + encodeURIComponent(episodeListUrl))).json(); const cleanedHtml = cleanJsonHtml(episodeListData.result); const episodeRegex = /]+eid="([^"]+)"[^>]+num="([^"]+)"[^>]*>/g; @@ -407,7 +407,7 @@ async function extractStreamUrl(url) { actualUrl = actualUrl.replace('&_=ENCRYPT_ME', `&_=${encryptedToken}`); } - const response = await fetchv2(actualUrl); + const response = await fetchv2("https://deno-proxies-sznvnpnxwhbv.deno.dev/?url=" + encodeURIComponent(actualUrl)); const text = await response.text(); const cleanedHtml = cleanJsonHtml(text); const subRegex = /
]*>([\s\S]*?)<\/div>/; @@ -446,7 +446,7 @@ async function extractStreamUrl(url) { }; return { type: result.name, - url: `https://animekai.to/ajax/links/view?id=${serverIdMap[result.name]}&_=${result.data}` + url: `https://anikai.to/ajax/links/view?id=${serverIdMap[result.name]}&_=${result.data}` }; }); @@ -454,7 +454,7 @@ async function extractStreamUrl(url) { const streamResponses = await Promise.all( streamUrls.map(async ({ type, url }) => { try { - const res = await fetchv2(url); + const res = await fetchv2("https://deno-proxies-sznvnpnxwhbv.deno.dev/?url=" + encodeURIComponent(url)); const json = await res.json(); return { type: type, @@ -510,7 +510,7 @@ async function extractStreamUrl(url) { const decryptedRaw = decryptedUrls.Softsub; const headers = { - "Referer": "https://animekai.to/", + "Referer": "https://anikai.to/", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36" }; @@ -575,7 +575,7 @@ async function extractStreamUrl(url) { actualUrl = actualUrl.replace('&_=ENCRYPT_ME', `&_=${encryptedToken}`); } - const response = await fetchv2(actualUrl); + const response = await fetchv2("https://deno-proxies-sznvnpnxwhbv.deno.dev/?url=" + encodeURIComponent(actualUrl)); const responseData = await response.json(); const cleanedHtml = cleanJsonHtml(responseData.result); @@ -606,7 +606,7 @@ async function extractStreamUrl(url) { } const streamUrl = `https://1movies.bz/ajax/links/view?id=${serverId}&_=${token}`; - const streamResponse = await fetchv2(streamUrl); + const streamResponse = await fetchv2("https://deno-proxies-sznvnpnxwhbv.deno.dev/?url=" + encodeURIComponent(streamUrl)); const streamData = await streamResponse.json(); if (!streamData.result) {