async function searchResults(keyword) { const results = []; const regex = /
\s*

(.*?)<\/p>\s*<\/div>/s); const description = match ? match[1].trim() : "N/A"; return JSON.stringify([{ description: description, aliases: "N/A", airdate: "N/A" }]); } catch (err) { return JSON.stringify([{ description: "Error", aliases: "Error", airdate: "Error" }]); } } async function extractEpisodes(url) { const results = []; const regex = /

\s*
\s*

\s*/gs; const dateRegex = /
\s*
\s*

.*?<\/h3>\s*<\/div>\s*
(.*?)<\/div>/s; try { const response = await fetchv2(url); const html = await response.text(); let match; let count = 1; while ((match = regex.exec(html)) !== null) { results.push({ href: match[1].trim(), number: count++ }); } return JSON.stringify(results); } catch (err) { return JSON.stringify([{ href: "Error", number: "Error", airdate: "Error" }]); } } async function extractStreamUrl(url) { try { const idMatch = url.match(/id=(\d+)/); const id = idMatch ? idMatch[1] : null; const headers = { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'X-Requested-With': 'XMLHttpRequest', 'Referer': url, 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3' }; const postData = `episode_id=${id}`; const response = await fetchv2("https://kisscartoon.sh/ajax/anime/load_episodes_v2?s=tserver", headers, 'POST', postData); const json = await response.json(); const iframeMatch = json.value.match(/