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]*?)<\/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(/