diff --git a/mangabuddy/mangabuddy.js b/mangabuddy/mangabuddy.js index 63d1864..c05076c 100644 --- a/mangabuddy/mangabuddy.js +++ b/mangabuddy/mangabuddy.js @@ -1,4 +1,4 @@ -async function searchContent(keyword, page=0) { +async function searchResults(keyword, page=0) { const results = []; try { const response = await fetch("https://mangabuddy.com/api/manga/search?q=" + encodeURIComponent(keyword)); @@ -21,7 +21,7 @@ async function searchContent(keyword, page=0) { } } -async function getContentData(url) { +async function extractDetails(url) { try { const response = await fetch(url); const html = await response.text(); @@ -41,7 +41,7 @@ async function getContentData(url) { } } -async function getChapters(url) { +async function extractChapters(url) { const results = []; try { const response = await fetch(url); @@ -80,7 +80,7 @@ async function getChapters(url) { } } -async function getChapterImages(url) { +async function extractImages(url) { const results = []; try { const response = await fetch(url); diff --git a/mangacloud/mangacloud.js b/mangacloud/mangacloud.js index 8aac3d8..62c2093 100644 --- a/mangacloud/mangacloud.js +++ b/mangacloud/mangacloud.js @@ -1,4 +1,4 @@ -async function searchContent(keyword,page=0){ +async function searchResults(keyword,page=0){ const results = []; try { const headers = { @@ -31,7 +31,7 @@ async function searchContent(keyword,page=0){ } } -async function getContentData(ID) { +async function extractDetails(ID) { try { const response = await fetch(`https://api.mangacloud.org/comic/${ID}`); const data = await response.json(); @@ -48,7 +48,7 @@ async function getContentData(ID) { } } -async function getChapters(ID) { +async function extractChapters(ID) { const results = []; try { const response = await fetch(`https://api.mangacloud.org/comic/${ID}`); @@ -73,7 +73,7 @@ async function getChapters(ID) { } } -async function getChapterImages(url) { +async function extractImages(url) { const chapterID = url.split("/").pop(); const ID = url.split("/").slice(-2, -1)[0]; const results = []; diff --git a/mangadex/mangadex.js b/mangadex/mangadex.js index 43ff835..e206082 100644 --- a/mangadex/mangadex.js +++ b/mangadex/mangadex.js @@ -1,4 +1,4 @@ -async function searchContent(keyword, page=0) { +async function searchResults(keyword, page=0) { const results = []; try { const offset = page * 100; @@ -46,7 +46,7 @@ async function searchContent(keyword, page=0) { } } -async function getContentData(ID) { +async function extractDetails(ID) { try { const response = await fetch(`https://api.mangadex.org/manga/${ID}?includes[]=artist&includes[]=author&includes[]=cover_art`); const data = await response.json(); @@ -77,7 +77,7 @@ async function getContentData(ID) { } } -async function getChapters(url) { +async function extractChapters(url) { const results = []; try { const limit = 100; @@ -147,7 +147,7 @@ async function getChapters(url) { } } -async function getChapterImages(chapterId) { +async function extractImages(chapterId) { try { const apiEndpoint = `https://api.mangadex.org/at-home/server/${chapterId}`; const apiResponse = await fetch(apiEndpoint); diff --git a/mangafire/mangafire.js b/mangafire/mangafire.js index 3de7c36..154e01c 100644 --- a/mangafire/mangafire.js +++ b/mangafire/mangafire.js @@ -1,4 +1,4 @@ -async function searchContent(input,page=0){ +async function searchResults(input,page=0){ function parseSearchResults(html) { const results = []; const regex = /
[\s\S]*?]*class="poster"[\s\S]*?]*alt="([^"]*)"/g; @@ -20,7 +20,7 @@ async function searchContent(input,page=0){ return parseSearchResults(data); } -async function getContentData(url) { +async function extractDetails(url) { function parseHtmlData(htmlContent) { const genreRegex = /([^<]+)<\/a>/g; const tags = []; @@ -69,7 +69,7 @@ async function getContentData(url) { return parseHtmlData(data); } -async function getChapters(url) { +async function extractChapters(url) { const mangaIdMatch = url.match(/\.([a-z0-9]+)$/); const mangaId = mangaIdMatch ? mangaIdMatch[1] : null; @@ -130,7 +130,7 @@ async function getChapters(url) { } } -async function getChapterImages(ID) { +async function extractImages(ID) { vrf = generate_vrf(`chapter@${ID}`); try { diff --git a/mangafreak/mangafreak.js b/mangafreak/mangafreak.js index 65864d4..314a739 100644 --- a/mangafreak/mangafreak.js +++ b/mangafreak/mangafreak.js @@ -1,4 +1,4 @@ -async function searchContent(keyword, page=0) { +async function searchResults(keyword, page=0) { const results = []; try { const response = await fetch("https://ww2.mangafreak.me/Find/" + encodeURIComponent(keyword)); @@ -20,7 +20,7 @@ async function searchContent(keyword, page=0) { } } -async function getContentData(url) { +async function extractDetails(url) { try { const response = await fetch(url); const html = await response.text(); @@ -40,7 +40,7 @@ async function getContentData(url) { } } -async function getChapters(url) { +async function extractChapters(url) { const results = []; try { const response = await fetch(url); @@ -67,7 +67,7 @@ async function getChapters(url) { } } -async function getChapterImages(url) { +async function extractImages(url) { const results = []; try { const response = await fetch(url); diff --git a/mangakatana/mangakatana.js b/mangakatana/mangakatana.js index 44db87d..1d77158 100644 --- a/mangakatana/mangakatana.js +++ b/mangakatana/mangakatana.js @@ -1,4 +1,4 @@ -async function searchContent(keyword, page = 0) { +async function searchResults(keyword, page = 0) { let results = []; try { const headers = { @@ -34,7 +34,7 @@ async function searchContent(keyword, page = 0) { } } -async function getContentData(url) { +async function extractDetails(url) { try { const response = await fetch(url); const html = await response.text(); @@ -74,7 +74,7 @@ async function getContentData(url) { } } -async function getChapters(url) { +async function extractChapters(url) { const results = []; try { const response = await fetch(url); @@ -110,7 +110,7 @@ async function getChapters(url) { } } -async function getChapterImages(url) { +async function extractImages(url) { const results = []; try { const response = await fetch(url); diff --git a/mangapark/mangapark.js b/mangapark/mangapark.js index d999580..c817142 100644 --- a/mangapark/mangapark.js +++ b/mangapark/mangapark.js @@ -13,7 +13,7 @@ function decodeHtmlEntities(text) { return text.replace(/&#?\w+;/g, (entity) => map[entity] || entity); } -async function searchContent(keyword) { +async function searchResults(keyword) { const results = []; const pages = [0, 2, 3, 4, 5]; @@ -53,7 +53,7 @@ async function searchContent(keyword) { } } -async function getContentData(url) { +async function extractDetails(url) { try { const response = await fetch(url); const html = await response.text(); @@ -82,7 +82,7 @@ async function getContentData(url) { } } -async function getChapters(url) { +async function extractChapters(url) { const results = []; try { const response = await fetch(url); @@ -129,7 +129,7 @@ async function getChapters(url) { } } -async function getChapterImages(url) { +async function extractImages(url) { const results = []; try { const response = await fetch(url); diff --git a/mangapub/mangapub.js b/mangapub/mangapub.js index 1bfa496..1f2ed1c 100644 --- a/mangapub/mangapub.js +++ b/mangapub/mangapub.js @@ -1,4 +1,4 @@ -async function searchContent(keyword, page=0) { +async function searchResults(keyword, page=0) { const results = []; try { const response = await fetch("https://mangapub.com/api/book/search?q=" + encodeURIComponent(keyword)); @@ -21,7 +21,7 @@ async function searchContent(keyword, page=0) { } } -async function getContentData(url) { +async function extractDetails(url) { try { const response = await fetch(url); const html = await response.text(); @@ -41,7 +41,7 @@ async function getContentData(url) { } } -async function getChapters(url) { +async function extractChapters(url) { const results = []; try { const response = await fetch(url); @@ -80,7 +80,7 @@ async function getChapters(url) { } } -async function getChapterImages(url) { +async function extractImages(url) { const results = []; try { const response = await fetch(url); diff --git a/mangataro/mangataro.js b/mangataro/mangataro.js index 25bcdc5..6a39722 100644 --- a/mangataro/mangataro.js +++ b/mangataro/mangataro.js @@ -1,4 +1,4 @@ -async function searchContent(keyword, page = 0) { +async function searchResults(keyword, page = 0) { let results = []; try { const headers = { @@ -28,7 +28,7 @@ async function searchContent(keyword, page = 0) { } } -async function getContentData(urlID) { +async function extractDetails(urlID) { try { const url = urlID.split(".").slice(0, -1).join("."); const response = await fetch(url); @@ -49,7 +49,7 @@ async function getContentData(urlID) { } } -async function getChapters(urlID) { +async function extractChapters(urlID) { const results = []; try { function md5(string) { @@ -272,7 +272,7 @@ async function getChapters(urlID) { } } -async function getChapterImages(url) { +async function extractImages(url) { const results = []; try { const response = await fetch(url); diff --git a/rumanhua1/rumanhua.js b/rumanhua1/rumanhua.js index 6dd64fd..4b59842 100644 --- a/rumanhua1/rumanhua.js +++ b/rumanhua1/rumanhua.js @@ -1,4 +1,4 @@ -async function searchContent(keyword,page=0){ +async function searchResults(keyword,page=0){ const headers = { "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8", "X-Requested-With": "XMLHttpRequest", @@ -25,7 +25,7 @@ async function searchContent(keyword,page=0){ return results; } -async function getContentData(url) { +async function extractDetails(url) { function parseHtmlData(htmlContent) { const tagsRegex = /标\s+签:\s*<\/span>\s*([\s\S]*?)状/; const descRegex = /

([\s\S]+?)<\/p>/; @@ -53,7 +53,7 @@ async function getContentData(url) { return parseHtmlData(data); } -async function getChapters(url) { +async function extractChapters(url) { function parseHtmlData(htmlContent) { const chapterRegex = /

  • ([^<]+)<\/li><\/a>/g; const chapters = []; @@ -86,7 +86,7 @@ async function getChapters(url) { return parseHtmlData(data); } -async function getChapterImages(url) { +async function extractImages(url) { function parseHtmlData(htmlContent) { const scriptRegex = /]*type=['"]text\/javascript['"][^>]*>([\s\S]*?)<\/script>/g; let obfuscatedScript = null; diff --git a/weebcentral/weebcentral.js b/weebcentral/weebcentral.js index 423517e..c066c33 100644 --- a/weebcentral/weebcentral.js +++ b/weebcentral/weebcentral.js @@ -1,4 +1,4 @@ -async function searchContent(keyword, page=0) { +async function searchResults(keyword, page=0) { const results = []; try { const headers = { @@ -30,7 +30,7 @@ async function searchContent(keyword, page=0) { } } -async function getContentData(url) { +async function extractDetails(url) { try { const response = await fetch(url); const html = await response.text(); @@ -61,7 +61,7 @@ async function getContentData(url) { } } -async function getChapters(url) { +async function extractChapters(url) { const results = []; try { const fullUrl = url.replace(/\/[^/]+$/, "/full-chapter-list"); @@ -93,7 +93,7 @@ async function getChapters(url) { } } -async function getChapterImages(url) { +async function extractImages(url) { const results = []; try { const fullUrl = url + "/images?is_prev=False¤t_page=1&reading_style=long_strip";