async function searchDafont(q) { const response = await fetch(`https://www.dafont.com/search.php?q=${q}`); const html = await response.text(); const $ = cheerio.load(html); const results = []; const regex = /.*?(.*?)<\/span>.*?by (.*?)<\/a>.*?<\/div>.*?.*?(.*?)<\/a>.*?>(.*?)<\/a>.*?<\/div>.*?.*?(.*?)<\/span>.*?<\/div>.*?.*?/g; let match; while ((match = regex.exec(html)) !== null) { const [, title, authorLink, author, themeLink, theme, , totalDownloads, previewImage, link] = match; results.push({ title: title.trim() || 'Tidak diketahui', authorLink: `https://www.dafont.com/${authorLink.trim()}` || 'Tidak diketahui', author: author.trim() || 'Tidak diketahui', themeLink: `https://www.dafont.com/${themeLink.trim()}` || 'Tidak diketahui', theme: theme.trim() || 'Tidak diketahui', totalDownloads: totalDownloads.trim().replace(/[^0-9]/g, '') || 'Tidak diketahui', previewImage: `https://www.dafont.com${previewImage.trim()}` || 'Tidak diketahui', link: `https://www.dafont.com/${link.trim()}` || 'Tidak diketahui', }); } return results; }