async function searchResults(keyword) { const results = []; const baseUrl = "https://www.beatz-anime.net"; try { const response = await fetchv2("https://www.beatz-anime.net/busqueda.php"); const html = await response.text(); const cardRegex = /
([\s\S]*?)<\/div>\s*<\/div>/gs; let cardMatch; while ((cardMatch = cardRegex.exec(html)) !== null) { const cardHTML = cardMatch[1]; const infoRegex = /.*?]*>([^<]+)<\/span>.*?]+src="([^"]+)"/s; const infoMatch = infoRegex.exec(cardHTML); if (infoMatch) { const title = infoMatch[2].trim(); if (title.toLowerCase().includes(keyword.toLowerCase())) { results.push({ href: baseUrl + infoMatch[1].trim(), title: title, image: baseUrl + infoMatch[3].trim() }); } } } return JSON.stringify(results); } catch (err) { return JSON.stringify([{ title: "Error", image: "Error", href: "Error" }]); } } async function extractDetails(url) { try { const response = await fetchv2(url); const html = await response.text(); const pMatch = html.match(/

]*>([\s\S]*?)<\/p>/); let description = "N/A"; let aliases = "N/A"; if (pMatch) { const content = pMatch[1]; const descMatch = content.split(//gi, "\n").trim(); if (descMatch) description = descMatch; const aliasMatch = content.match(/SinĂ³nimos:<\/b>\s*([^<]+)/); if (aliasMatch) aliases = aliasMatch[1].trim(); } return JSON.stringify([{ description: description, aliases: aliases, airdate: "N/A" }]); } catch (err) { return JSON.stringify([{ description: "Error", aliases: "Error", airdate: "Error" }]); } } async function extractEpisodes(url) { const results = []; try { const response = await fetchv2(url); const html = await response.text(); const rows = html.match(/([\s\S]*?)<\/tbody>/)?.[1].match(/[\s\S]*?<\/tr>/g) || []; rows.forEach((row, index) => { const hrefMatch = row.match(/