async function searchResults(keyword) { const response = await fetch(`https://111.90.159.132/?s=${keyword}`); const html = await response; const results = []; const filmListRegex = /]+itemscope[^>]+itemtype="http:\/\/schema\.org\/Movie"[^>]*>[\s\S]*?<\/article>/g; const items = html.match(filmListRegex); if (!items) return results; items.forEach(itemHtml => { const titleMatch = itemHtml.match(/

]*>\s*]+>([^<]+)<\/a>/); const hrefMatch = itemHtml.match(/]+title="Watch Movie:/); const imgMatch = itemHtml.match(/]+src="([^"]+)"[^>]+alt="([^"]+)"/); if (titleMatch && hrefMatch && imgMatch) { results.push({ title: titleMatch[1].trim(), image: imgMatch[1].trim(), href: hrefMatch[1].trim() }); } }); console.log(JSON.stringify(results)); return JSON.stringify(results); } async function extractDetails(url) { const response = await fetch(url); const html = await response; const details = []; const descriptionMatch = html.match(/

]*>([\s\S]*?)<\/div>/); let description = descriptionMatch ? descriptionMatch[1].replace(/<\/?[^>]+(>|$)/g, "").trim() : ''; const entities = { '‘': '‘', '’': '’', '“': '“', '”': '”', '&': '&', ''': "'", ' ': ' ', '©': '©', '®': '®', '™': '™', }; for (const [entity, char] of Object.entries(entities)) { description = description.replace(new RegExp(entity, 'g'), char); } description = description.replace(/\s+/g, ' ').replace(/Country:[^<]+/g, '').trim(); const airdateMatch = html.match(/Year: