async function searchResults(keyword) {
const results = [];
const image = 'https://files.catbox.moe/9tbjtb.png';
const regex = /
| ([^<]+)<\/a><\/td> | ]*>[^<]*<\/td><\/tr>/g;
const urls = [
'https://a.111477.xyz/tvs/',
'https://a.111477.xyz/movies/',
'https://a.111477.xyz/kdrama/',
'https://a.111477.xyz/asiandrama/'
];
for (const url of urls) {
const response = await fetchv2(url);
const html = await response.text();
let match;
while ((match = regex.exec(html)) !== null) {
const rawTitle = match[2].trim().replace(/\/$/, '');
const cleanedTitle = rawTitle.replace(/\.+/g, ' ').toLowerCase();
if (cleanedTitle.includes(keyword.toLowerCase())) {
results.push({
title: rawTitle.replace(/\.+/g, ' '),
image,
href: url + match[1].trim()
});
}
}
}
return JSON.stringify(results);
}
async function extractDetails(url) {
const results = [];
results.push({
description: 'None provided, but hell who cares anyway',
aliases: 'N/A',
airdate: 'N/A'
});
return JSON.stringify(results);
}
async function extractEpisodes(url) {
const results = [];
const response = await fetchv2(url);
const html = await response.text();
const episodeRegex = / |