From 9769569e301104d3374d91920557661b6fd475f8 Mon Sep 17 00:00:00 2001 From: aka paul <50n50@noreply.localhost> Date: Wed, 26 Nov 2025 22:05:13 +0000 Subject: [PATCH] Update rumanhua1/rumanhua.js --- rumanhua1/rumanhua.js | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/rumanhua1/rumanhua.js b/rumanhua1/rumanhua.js index 52f557c..6dd64fd 100644 --- a/rumanhua1/rumanhua.js +++ b/rumanhua1/rumanhua.js @@ -5,7 +5,11 @@ async function searchContent(keyword,page=0){ }; const postData = `k=${encodeURIComponent(keyword)}`; - const response = await fetch(`http://www.rumanhua1.com/s`, headers, "POST", postData ); + const response = await fetch(`http://www.rumanhua1.com/s`, { + method: "POST", + headers: headers, + body: postData + }); const html = await response.text(); const results = []; const regex = /
[\s\S]*?]*src="([^"]+)"[\s\S]*?

([^<]+)<\/p>[\s\S]*?

([^<]+)<\/p>/g; @@ -13,11 +17,12 @@ async function searchContent(keyword,page=0){ while ((match = regex.exec(html)) !== null) { results.push({ id: "http://www.rumanhua1.com" + match[1], - imageURL: "http://www.rumanhua1.com" + match[2], + imageURL: match[2], title: match[3] }); } - return JSON.stringify(results); + console.log(JSON.stringify(results)); + return results; } async function getContentData(url) { @@ -58,21 +63,24 @@ async function getChapters(url) { while ((match = chapterRegex.exec(htmlContent)) !== null) { chapters.push([ String(index), - { - id: "http://rumanhua1.com" + match[1], - scanlation_group: "Rumanhua", - title: match[2].trim() - } + [ + { + id: "http://rumanhua1.com" + match[1], + title: match[2].trim(), + chapter: index, + scanlation_group: "Rumanhua" + } + ] ]); index++; } return { - eng: chapters + en: chapters }; } - const response = await fetchv2(url); + const response = await fetch(url); const data = await response.text(); console.log(JSON.stringify(parseHtmlData(data))); return parseHtmlData(data);