mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-14 19:01:15 +00:00
adjusted novel sources
This commit is contained in:
@@ -7,7 +7,7 @@ const mangayomiSources = [{
|
|||||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/main/javascript/icon/en.novelupdates.png",
|
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/main/javascript/icon/en.novelupdates.png",
|
||||||
"typeSource": "single",
|
"typeSource": "single",
|
||||||
"itemType": 2,
|
"itemType": 2,
|
||||||
"version": "0.0.2",
|
"version": "0.0.3",
|
||||||
"dateFormat": "",
|
"dateFormat": "",
|
||||||
"dateFormatLocale": "",
|
"dateFormatLocale": "",
|
||||||
"pkgPath": "novel/src/en/novelupdates.js",
|
"pkgPath": "novel/src/en/novelupdates.js",
|
||||||
@@ -188,8 +188,13 @@ class DefaultExtension extends MProvider {
|
|||||||
"User-Agent":
|
"User-Agent":
|
||||||
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36",
|
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36",
|
||||||
});
|
});
|
||||||
const doc = new Document(res.body);
|
return await this.cleanHtmlContent(res.body);
|
||||||
const domain = res.body;
|
}
|
||||||
|
|
||||||
|
async cleanHtmlContent(html) {
|
||||||
|
const client = await new Client();
|
||||||
|
const doc = new Document(html);
|
||||||
|
const domain = html;
|
||||||
|
|
||||||
if (domain.includes("anotivereads")) {
|
if (domain.includes("anotivereads")) {
|
||||||
const title =
|
const title =
|
||||||
@@ -424,7 +429,6 @@ class DefaultExtension extends MProvider {
|
|||||||
return e?.toLowerCase().includes("wordpress") || e?.toLowerCase().includes("site kit by google")
|
return e?.toLowerCase().includes("wordpress") || e?.toLowerCase().includes("site kit by google")
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
let title =
|
let title =
|
||||||
doc.selectFirst(".entry-title")?.text.trim() ||
|
doc.selectFirst(".entry-title")?.text.trim() ||
|
||||||
doc.selectFirst(".entry-title-main")?.text.trim() ||
|
doc.selectFirst(".entry-title-main")?.text.trim() ||
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ const mangayomiSources = [{
|
|||||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/main/javascript/icon/en.wordrain69.png",
|
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/main/javascript/icon/en.wordrain69.png",
|
||||||
"typeSource": "single",
|
"typeSource": "single",
|
||||||
"itemType": 2,
|
"itemType": 2,
|
||||||
"version": "0.0.1",
|
"version": "0.0.2",
|
||||||
"dateFormat": "",
|
"dateFormat": "",
|
||||||
"dateFormatLocale": "",
|
"dateFormatLocale": "",
|
||||||
"pkgPath": "novel/src/en/wordrain69.js",
|
"pkgPath": "novel/src/en/wordrain69.js",
|
||||||
@@ -121,7 +121,11 @@ const mangayomiSources = [{
|
|||||||
async getHtmlContent(url) {
|
async getHtmlContent(url) {
|
||||||
const client = await new Client();
|
const client = await new Client();
|
||||||
const res = await client.get(url);
|
const res = await client.get(url);
|
||||||
const doc = new Document(res.body);
|
return await this.cleanHtmlContent(res.body);
|
||||||
|
}
|
||||||
|
|
||||||
|
async cleanHtmlContent(html) {
|
||||||
|
const doc = new Document(html);
|
||||||
const title =
|
const title =
|
||||||
doc.selectFirst("#chapter-heading")?.text.trim() ||
|
doc.selectFirst("#chapter-heading")?.text.trim() ||
|
||||||
"";
|
"";
|
||||||
|
|||||||
@@ -111,7 +111,11 @@ class DefaultExtension extends MProvider {
|
|||||||
async getHtmlContent(url) {
|
async getHtmlContent(url) {
|
||||||
const client = await new Client();
|
const client = await new Client();
|
||||||
const res = await client.get(url);
|
const res = await client.get(url);
|
||||||
const doc = new Document(res.body);
|
return await this.cleanHtmlContent(res.body);
|
||||||
|
}
|
||||||
|
|
||||||
|
async cleanHtmlContent(html) {
|
||||||
|
const doc = new Document(html);
|
||||||
const title =
|
const title =
|
||||||
doc.selectFirst("div.mantine-Center-root > h1.mantine-Title-root")?.text.trim() ||
|
doc.selectFirst("div.mantine-Center-root > h1.mantine-Title-root")?.text.trim() ||
|
||||||
"";
|
"";
|
||||||
Reference in New Issue
Block a user