async function searchResults(keyword, page=0) { const results = []; try { const headers = { "Content-Type": "application/x-www-form-urlencoded" }; const postData = `text=${encodeURIComponent(keyword)}`; const response = await fetch(`https://weebcentral.com/search/simple?location=main`, { method: "POST", headers: headers, body: postData }); const html = await response.text(); const regex = /]*>[\s\S]*?]*>[\s\S]*?
([^<]+)<\/div>/g; let match; while ((match = regex.exec(html)) !== null) { results.push({ id: match[1].trim(), imageURL: match[2].trim(), title: match[3].trim().replace(/'/g, "'") }); } return results; } catch (err) { return []; } } async function extractDetails(url) { try { const response = await fetch(url); const html = await response.text(); const descMatch = html.match(/Description<\/strong>\s*

([\s\S]*?)<\/p>/); const description = descMatch ? descMatch[1].trim().replace(/'/g, "'") : ""; const tagsMatch = html.match(/Associated Name\(s\)<\/strong>\s*