diff --git a/mangafreak/mangafreak.js b/mangafreak/mangafreak.js new file mode 100644 index 0000000..65864d4 --- /dev/null +++ b/mangafreak/mangafreak.js @@ -0,0 +1,86 @@ +async function searchContent(keyword, page=0) { + const results = []; + try { + const response = await fetch("https://ww2.mangafreak.me/Find/" + encodeURIComponent(keyword)); + const html = await response.text(); + const regex = /
([\s\S]*?)<\/p>/; + const match = descRegex.exec(html); + const description = match ? match[1].trim() : ""; + + return { + description: description, + tags: [] + }; + } catch (err) { + return { + description: "Error", + tags: [] + }; + } +} + +async function getChapters(url) { + const results = []; + try { + const response = await fetch(url); + const html = await response.text(); + const regex = /