fix: Plugins (#578)

* test

* test

* fix

* any

* update

* update

* fix LightNovelReader

* Why did I do that

* typo

* fix

* type

* unused icons have been removed

* madara...

* ops

* fix

* close #563

* update

* LitSpace

* fix jaomix

* fix renovels

* fix ficbook

* update ficbook
This commit is contained in:
Rider21
2023-10-30 09:45:33 +03:00
committed by GitHub
parent 5258464743
commit ac96c62066
244 changed files with 45894 additions and 18184 deletions
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://boxnovel.com/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "novel" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "manga-genre/" + filters.genres + '/';
} else {
url += "novel/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [{"key":"sort","label":"Order by","values":[{"label":"Rating","value":"rating"},{"label":"A-Z","value":"alphabet"},{"label":"Latest","value":"latest"},{"label":"Most Views","value":"views"},{"label":"New","value":"new-manga"},{"label":"Trending","value":"trending"}],"inputType":FilterInputs.Picker},{"key":"genres","label":"GENRES","values":[{"label":"Action","value":"action"},{"label":"Adventure","value":"adventure"},{"label":"Comedy","value":"comedy"},{"label":"Drama","value":"drama"},{"label":"Ecchi","value":"ecchi"},{"label":"Fantasy","value":"fantasy"},{"label":"Gender Bender","value":"gender-bender"},{"label":"Harem","value":"harem"},{"label":"Historical","value":"historical"},{"label":"Horror","value":"horror"},{"label":"Josei","value":"josei"},{"label":"Martial Arts","value":"martial-arts"},{"label":"Mature","value":"mature"},{"label":"Mecha","value":"mecha"},{"label":"Mystery","value":"mystery"},{"label":"Psychological","value":"psychological"},{"label":"Romance","value":"romance"},{"label":"School Life","value":"school-life"},{"label":"Sci-fi","value":"sci-fi"},{"label":"Seinen","value":"seinen"},{"label":"Shoujo","value":"shoujo"},{"label":"Shounen","value":"shounen"},{"label":"Slice of Life","value":"slice-of-life"},{"label":"Smut","value":"smut"},{"label":"Sports","value":"sports"},{"label":"Supernatural","value":"supernatural"},{"label":"Tragedy","value":"tragedy"},{"label":"Wuxia","value":"wuxia"},{"label":"Xianxia","value":"xianxia"},{"label":"Xuanhuan","value":"xuanhuan"},{"label":"Yaoi","value":"yaoi"}],"inputType":FilterInputs.Picker}];
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://clicknovel.net/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "novel" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "novel-genre/" + filters.genres + '/';
} else {
url += "novel/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [];
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://cratenovel.com/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "novel" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "novel-genre/" + filters.genres + '/';
} else {
url += "novel/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [];
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://daonovel.com/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "novels-list" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "novel-genre/" + filters.genres + '/';
} else {
url += "novels-list/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [{"key":"sort","label":"Order by","values":[{"label":"Rating","value":"rating"},{"label":"A-Z","value":"alphabet"},{"label":"Latest","value":"latest"},{"label":"Most Views","value":"views"},{"label":"New","value":"new-manga"},{"label":"Trending","value":"trending"}],"inputType":FilterInputs.Picker}];
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://fanstranslations.com/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "novel" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "novel-genre/" + filters.genres + '/';
} else {
url += "novel/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [{"key":"sort","label":"Order by","values":[{"label":"Rating","value":"rating"},{"label":"A-Z","value":"alphabet"},{"label":"Latest","value":"latest"},{"label":"Most Views","value":"views"},{"label":"New","value":"new-manga"},{"label":"Trending","value":"trending"}],"inputType":FilterInputs.Picker}];
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://1stkissnovel.org/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "novel" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "novel-genre/" + filters.genres + '/';
} else {
url += "novel/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [{"key":"sort","label":"Order by","values":[{"label":"Rating","value":"rating"},{"label":"A-Z","value":"alphabet"},{"label":"Latest","value":"latest"},{"label":"Most Views","value":"views"},{"label":"New","value":"new-manga"},{"label":"Trending","value":"trending"}],"inputType":FilterInputs.Picker},{"key":"genres","label":"GENRES","values":[{"label":"Action","value":"action"},{"label":"Adult","value":"adult"},{"label":"Adventure","value":"adventure"},{"label":"Anime","value":"anime"},{"label":"Apocalypse","value":"apocalypse"},{"label":"Boy's Love","value":"boys-love"},{"label":"Comedy","value":"comedy"},{"label":"Completed","value":"completed"},{"label":"Cooking","value":"cooking"},{"label":"Demons","value":"demons"},{"label":"Detective","value":"detective"},{"label":"Drama","value":"drama"},{"label":"Ecchi","value":"ecchi"},{"label":"Fan-Fiction","value":"fan-fiction"},{"label":"Fantasy","value":"fantasy"},{"label":"Food","value":"food"},{"label":"Game","value":"game"},{"label":"Gender Bender","value":"gender-bender"},{"label":"Girls Love","value":"girls-love"},{"label":"Harem","value":"harem"},{"label":"Historical","value":"historical"},{"label":"Horror","value":"horror"},{"label":"Humor","value":"humor"},{"label":"Isekai","value":"isekai"},{"label":"Josei","value":"josei"},{"label":"Magic","value":"magic"},{"label":"Magical","value":"magical"},{"label":"Manhua","value":"manhua"},{"label":"Manhwa","value":"manhwa"},{"label":"Martial Arts","value":"martial-arts"},{"label":"Mature","value":"mature"},{"label":"Mecha","value":"mecha"},{"label":"Medical","value":"medical"},{"label":"Military","value":"military"},{"label":"Moder","value":"moder"},{"label":"Modern","value":"modern"},{"label":"Murim","value":"murim"},{"label":"Music","value":"music"},{"label":"Mystery","value":"mystery"},{"label":"Psychological","value":"psychological"},{"label":"Reverse","value":"reverse"},{"label":"Reverse harem","value":"reverse-harem"},{"label":"Romance","value":"romance"},{"label":"School Life","value":"school-life"},{"label":"Sci-fi","value":"sci-fi"},{"label":"Seinen","value":"seinen"},{"label":"Shoujo","value":"shoujo"},{"label":"Shoujo Ai","value":"shoujo-ai"},{"label":"Shounen","value":"shounen"},{"label":"Shounen Ai","value":"shounen-ai"},{"label":"Slice of Life","value":"slice-of-life"},{"label":"Smut","value":"smut"},{"label":"Sports","value":"sports"},{"label":"Super power","value":"super-power"},{"label":"Superhero","value":"superhero"},{"label":"Supernatural","value":"supernatural"},{"label":"Thriller","value":"thriller"},{"label":"Tragedy","value":"tragedy"},{"label":"Urban Life","value":"urban-life"},{"label":"Vampire","value":"vampire"},{"label":"Webtoons","value":"webtoons"},{"label":"Wuxia","value":"wuxia"},{"label":"Xianxia","value":"xianxia"},{"label":"Xuanhuan","value":"xuanhuan"},{"label":"Yaoi","value":"yaoi"},{"label":"Yuri","value":"yuri"}],"inputType":FilterInputs.Picker}];
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://freenovel.me/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "novel" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "novel-genre/" + filters.genres + '/';
} else {
url += "novel/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [{"key":"sort","label":"Order by","values":[{"label":"Rating","value":"rating"},{"label":"A-Z","value":"alphabet"},{"label":"Latest","value":"latest"},{"label":"Most Views","value":"views"},{"label":"New","value":"new-manga"},{"label":"Trending","value":"trending"}],"inputType":FilterInputs.Picker},{"key":"genres","label":"GENRES","values":[{"label":"Action","value":"action"},{"label":"Adult","value":"adult"},{"label":"Adventure","value":"adventure"},{"label":"Cartoon","value":"cartoon"},{"label":"Comedy","value":"comedy"},{"label":"Cooking","value":"cooking"},{"label":"Detective","value":"detective"},{"label":"Drama","value":"drama"},{"label":"Fantasy","value":"fantasy"},{"label":"Game","value":"game"},{"label":"Gender Bender","value":"gender-bender"},{"label":"Historical","value":"historical"},{"label":"History","value":"history"},{"label":"Horror","value":"horror"},{"label":"Josei","value":"josei"},{"label":"Live action","value":"live-action"},{"label":"Martial","value":"martial"},{"label":"Martial Arts","value":"martial-arts"},{"label":"Mature","value":"mature"},{"label":"Mecha","value":"mecha"},{"label":"Mystery","value":"mystery"},{"label":"One shot","value":"one-shot"},{"label":"Premium","value":"premium"},{"label":"Psychological","value":"psychological"},{"label":"Reincarnation","value":"reincarnation"},{"label":"Romance","value":"romance"},{"label":"School Life","value":"school-life"},{"label":"Sci-fi","value":"sci-fi"},{"label":"Slice of Life","value":"slice-of-life"},{"label":"Smut","value":"smut"},{"label":"Sports","value":"sports"},{"label":"Supernatural","value":"supernatural"},{"label":"Tragedy","value":"tragedy"},{"label":"Wuxia","value":"wuxia"},{"label":"Xianxia","value":"xianxia"},{"label":"Xuanhuan","value":"xuanhuan"}],"inputType":FilterInputs.Picker}];
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://guavaread.com/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "novel" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "novel-genre/" + filters.genres + '/';
} else {
url += "novel/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [{"key":"sort","label":"Order by","values":[{"label":"Rating","value":"rating"},{"label":"A-Z","value":"alphabet"},{"label":"Latest","value":"latest"},{"label":"Most Views","value":"views"},{"label":"New","value":"new-manga"},{"label":"Trending","value":"trending"}],"inputType":FilterInputs.Picker},{"key":"genres","label":"GENRES","values":[{"label":"Action","value":"action"},{"label":"Adult","value":"adult"},{"label":"Adventure","value":"adventure"},{"label":"Comedy","value":"comedy"},{"label":"Complete","value":"complete"},{"label":"Cooking","value":"cooking"},{"label":"Detective","value":"detective"},{"label":"Drama","value":"drama"},{"label":"Dropped","value":"dropped"},{"label":"Ecchi","value":"ecchi"},{"label":"Fantasy","value":"fantasy"},{"label":"Gender Bender","value":"gender-bender"},{"label":"Historical","value":"historical"},{"label":"Horror","value":"horror"},{"label":"Josei","value":"josei"},{"label":"Mature","value":"mature"},{"label":"Mystery","value":"mystery"},{"label":"Original Story","value":"original-story"},{"label":"Pilot","value":"pilot"},{"label":"Psychological","value":"psychological"},{"label":"R-15","value":"r-15"},{"label":"R-19","value":"r-19"},{"label":"Reverse Harem","value":"reverse-harem"},{"label":"Romance","value":"romance"},{"label":"School Life","value":"school-life"},{"label":"Sci-fi","value":"sci-fi"},{"label":"Shoujo","value":"shoujo"},{"label":"Slice of Life","value":"slice-of-life"},{"label":"Smut","value":"smut"},{"label":"Supernatural","value":"supernatural"},{"label":"Tragedy","value":"tragedy"}],"inputType":FilterInputs.Picker}];
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://lightnovelheaven.com/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "series" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "novel-genre/" + filters.genres + '/';
} else {
url += "series/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [{"key":"sort","label":"Order by","values":[{"label":"Rating","value":"rating"},{"label":"A-Z","value":"alphabet"},{"label":"Latest","value":"latest"},{"label":"Most Views","value":"views"},{"label":"New","value":"new-manga"},{"label":"Trending","value":"trending"}],"inputType":FilterInputs.Picker}];
@@ -143,22 +143,17 @@ export const searchNovels: Plugin.searchNovels = async function (searchTerm) {
const url =
baseUrl + `/search/autocomplete?dataType=json&query=${searchTerm}`;
const result = await fetchApi(url);
const body = await result.json();
const data = body?.results || [];
const body = await result.json() as { results: ResultsEntity[] };
const novels: Novel.Item[] = [];
data.forEach((item) => {
let novelUrl = item.link;
let novelName = item.original_title;
let novelCover = item.image;
body.results.forEach((item) =>
novels.push({
url: novelUrl,
name: novelName,
cover: novelCover,
});
});
url: item.link,
name: item.original_title,
cover: item.image,
})
);
return novels;
};
@@ -166,3 +161,10 @@ export const searchNovels: Plugin.searchNovels = async function (searchTerm) {
export const fetchImage: Plugin.fetchImage = async function (url) {
return await fetchFile(url, {});
};
interface ResultsEntity {
overview: string;
original_title: string;
link: string;
image: string;
}
+192 -194
View File
@@ -1,197 +1,195 @@
import { load as parseHTML } from "cheerio";
// import dayjs from 'dayjs';
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
// import { parseMadaraDate } from "@libs/parseMadaraDate";
// import { isUrlAbsolute } from '@libs/isAbsoluteUrl';
// import { showToast } from "@libs/showToast";
// import { Filter, FilterInputs } from "@libs/filterInputs";
// import { NovelStatus } from '@libs/novelStatus';
// import { defaultCover } from "@libs/defaultCover";
export const id = "Ltnovel.com";
export const name = "Ltnovel.com";
export const icon = "multisrc/readwn/icon/ltnovel.png";
export const version = "1.0.0";
export const site = "https://www.ltnovel.com/";
// export const filters: Filter[] = [];
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async function (
page,
{ filters, showLatestNovels }
) {
const novels: Novel.Item[] = [];
const pageNo = page - 1;
const url = baseUrl + 'list/all/all-onclick-' + pageNo +'.html';
const result = await fetchApi(url);
const body = await result.text();
const loadedCheerio = parseHTML(body);
loadedCheerio('li.novel-item').each(function () {
const novelName = loadedCheerio(this).find('h4').text();
const novelUrl = baseUrl + loadedCheerio(this).find('a').attr('href');
const coverUri = loadedCheerio(this)
.find('.novel-cover > img')
.attr('data-src');
const novelCover = baseUrl + coverUri;
const novel = { name: novelName, cover: novelCover, url: novelUrl };
novels.push(novel);
});
return novels;
import { load as parseHTML } from "cheerio";
// import dayjs from 'dayjs';
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { parseMadaraDate } from "@libs/parseMadaraDate";
// import { isUrlAbsolute } from '@libs/isAbsoluteUrl';
// import { showToast } from "@libs/showToast";
import { FilterInputs } from "@libs/filterInputs";
// import { NovelStatus } from '@libs/novelStatus';
// import { defaultCover } from "@libs/defaultCover";
export const id = "Ltnovel.com";
export const name = "Ltnovel.com";
export const icon = "multisrc/readwn/icons/ltnovel.png";
export const version = "1.0.0";
export const site = "https://www.ltnovel.com/";
export const popularNovels: Plugin.popularNovels = async function (
page,
{ filters, showLatestNovels }
) {
const novels: Novel.Item[] = [];
const pageNo = page - 1;
let url = site + 'list/';
url += (filters?.genres || 'all') + '/';
url += (filters?.status || 'all') + '-';
url += (showLatestNovels ? 'lastdotime' : filters?.sort || 'newstime') + '-';
url += pageNo + '.html';
const result = await fetchApi(url);
const body = await result.text();
const loadedCheerio = parseHTML(body);
loadedCheerio('li.novel-item').each(function () {
const novelName = loadedCheerio(this).find('h4').text();
const novelUrl = site + loadedCheerio(this).find('a').attr('href');
const coverUri = loadedCheerio(this)
.find('.novel-cover > img')
.attr('data-src');
const novelCover = site + coverUri;
const novel = { name: novelName, cover: novelCover, url: novelUrl };
novels.push(novel);
});
return novels;
};
export const parseNovelAndChapters: Plugin.parseNovelAndChapters =
async function (novelUrl) {
const result = await fetchApi(novelUrl);
const body = await result.text();
let loadedCheerio = parseHTML(body);
const novel: Novel.instance = {
url: novelUrl,
chapters: [],
};
export const parseNovelAndChapters: Plugin.parseNovelAndChapters =
async function (novelUrl) {
const result = await fetchApi(novelUrl);
const body = await result.text();
let loadedCheerio = parseHTML(body);
const novel: Novel.instance = {
url: novelUrl,
chapters: [],
};
novel.name = loadedCheerio('h1.novel-title').text();
const coverUri = loadedCheerio('figure.cover > img').attr('data-src');
novel.cover = baseUrl + coverUri;
novel.summary = loadedCheerio('.summary')
.text()
.replace('Summary', '')
.trim();
novel.genres = '';
loadedCheerio('div.categories > ul > li').each(function () {
novel.genres += loadedCheerio(this).text().trim() + ',';
});
loadedCheerio('div.header-stats > span').each(function () {
if (loadedCheerio(this).find('small').text() === 'Status') {
novel.status = loadedCheerio(this).find('strong').text();
}
});
novel.genres = novel.genres.slice(0, -1);
novel.author = loadedCheerio('span[itemprop=author]').text();
let novelChapters: Chapter.Item[] = [];
const novelId = novelUrl.replace('.html', '').replace(baseUrl, '');
const latestChapterNo = parseInt(loadedCheerio('.header-stats')
.find('span > strong')
.first()
.text()
.trim());
let lastChapterNo = 1;
loadedCheerio('.chapter-list li').each(function () {
const chapterName = loadedCheerio(this)
.find('a .chapter-title')
.text()
.trim();
const chapterUrl = baseUrl + loadedCheerio(this).find('a').attr('href')?.trim();
const releaseDate = loadedCheerio(this)
.find('a .chapter-update')
.text()
.trim();
lastChapterNo = parseInt(loadedCheerio(this).find('a .chapter-no').text().trim());
const chapter = { name: chapterName, releaseTime: releaseDate, url: chapterUrl };
novelChapters.push(chapter);
});
// Itterate once more before loop to finish off
lastChapterNo++;
for (let i = lastChapterNo; i <= latestChapterNo; i++) {
const chapterName = 'Chapter ' + i;
const chapterUrl = baseUrl + novelId+'_'+ i +'.html';
const releaseDate = null;
const chapter = { name: chapterName, releaseTime: releaseDate,url: chapterUrl };
novelChapters.push(chapter);
}
novel.chapters = novelChapters;
return novel;
};
export const parseChapter: Plugin.parseChapter = async function (chapterUrl) {
const result = await fetchApi(chapterUrl);
const body = await result.text();
const loadedCheerio = parseHTML(body);
const chapterText = loadedCheerio('.chapter-content').html();
return chapterText;
novel.name = loadedCheerio('h1.novel-title').text();
const coverUri = loadedCheerio('figure.cover > img').attr('data-src');
novel.cover = site + coverUri;
novel.summary = loadedCheerio('.summary')
.text()
.replace('Summary', '')
.trim();
novel.genres = '';
loadedCheerio('div.categories > ul > li').each(function () {
novel.genres += loadedCheerio(this).text().trim() + ',';
});
loadedCheerio('div.header-stats > span').each(function () {
if (loadedCheerio(this).find('small').text() === 'Status') {
novel.status = loadedCheerio(this).find('strong').text();
}
});
novel.genres = novel.genres.slice(0, -1);
novel.author = loadedCheerio('span[itemprop=author]').text();
let novelChapters: Chapter.Item[] = [];
const novelId = novelUrl.replace('.html', '').replace(site, '');
const latestChapterNo = parseInt(loadedCheerio('.header-stats')
.find('span > strong')
.first()
.text()
.trim());
let lastChapterNo = 1;
loadedCheerio('.chapter-list li').each(function () {
const chapterName = loadedCheerio(this)
.find('a .chapter-title')
.text()
.trim();
const chapterUrl = site + loadedCheerio(this).find('a').attr('href')?.trim();
const releaseDate = loadedCheerio(this)
.find('a .chapter-update')
.text()
.trim();
lastChapterNo = parseInt(loadedCheerio(this).find('a .chapter-no').text().trim());
const chapter = { name: chapterName, releaseTime: parseMadaraDate(releaseDate), url: chapterUrl };
novelChapters.push(chapter);
});
// Itterate once more before loop to finish off
lastChapterNo++;
for (let i = lastChapterNo; i <= latestChapterNo; i++) {
const chapterName = 'Chapter ' + i;
const chapterUrl = site + novelId+'_'+ i +'.html';
const releaseDate = null;
const chapter = { name: chapterName, releaseTime: releaseDate,url: chapterUrl };
novelChapters.push(chapter);
}
novel.chapters = novelChapters;
return novel;
};
export const parseChapter: Plugin.parseChapter = async function (chapterUrl) {
const result = await fetchApi(chapterUrl);
const body = await result.text();
const loadedCheerio = parseHTML(body);
const chapterText = loadedCheerio('.chapter-content').html();
return chapterText;
};
export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
const novels: Novel.Item[] = [];
const searchUrl = site + 'e/search/index.php';
const result = await fetchApi(searchUrl, {
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
Referer: site + 'search.html',
Origin: site,
'user-agent':
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36',
},
method: 'POST',
body: JSON.stringify({
show: 'title',
tempid: 1,
tbname: 'news',
keyboard: searchTerm,
}),
});
const body = await result.text();
const loadedCheerio = parseHTML(body);
loadedCheerio('li.novel-item').each(function () {
const novelName = loadedCheerio(this).find('h4').text();
const novelUrl = site + loadedCheerio(this).find('a').attr('href');
const coverUri = site + loadedCheerio(this).find('img').attr('data-src');
const novelCover = site + coverUri;
const novel = {
name: novelName,
cover: novelCover,
url: novelUrl,
};
export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
const novels: Novel.Item[] = [];
const searchUrl = baseUrl + 'e/search/index.php';
const result = await fetchApi(searchUrl, {
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
Referer: baseUrl + 'search.html',
Origin: baseUrl,
'user-agent':
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36',
},
method: 'POST',
body: JSON.stringify({
show: 'title',
tempid: 1,
tbname: 'news',
keyboard: searchTerm,
}),
});
const body = await result.text();
const loadedCheerio = parseHTML(body);
loadedCheerio('li.novel-item').each(function () {
const novelName = loadedCheerio(this).find('h4').text();
const novelUrl = baseUrl + loadedCheerio(this).find('a').attr('href');
const coverUri = baseUrl + loadedCheerio(this).find('img').attr('data-src');
const novelCover = baseUrl + coverUri;
const novel = {
name: novelName,
cover: novelCover,
url: novelUrl,
};
novels.push(novel);
});
return novels;
};
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url, {});
};
novels.push(novel);
});
return novels;
};
export const fetchImage: Plugin.fetchImage = fetchFile;
export const filters = [{"key":"sort","label":"Sort By","values":[{"label":"New","value":"newstime"},{"label":"Popular","value":"onclick"},{"label":"Updates","value":"lastdotime"}], "inputType":FilterInputs.Picker},{"key":"status","label":"Status","values":[{"label":"All","value":"all"},{"label":"Completed","value":"Completed"},{"label":"Ongoing","value":"Ongoing"}], "inputType":FilterInputs.Picker},{"key":"genres","label":"Genre / Category","values":[{"label":"All","value":"all"},{"label":"Action","value":"action"},{"label":"Adult","value":"adult"},{"label":"Adventure","value":"adventure"},{"label":"Comedy","value":"comedy"},{"label":"Contemporary Romance","value":"contemporary-romance"},{"label":"Drama","value":"drama"},{"label":"Eastern Fantasy","value":"eastern-fantasy"},{"label":"Ecchi","value":"ecchi"},{"label":"Fantasy","value":"fantasy"},{"label":"Fantasy Romance","value":"fantasy-romance"},{"label":"Game","value":"game"},{"label":"Gender Bender","value":"gender-bender"},{"label":"Harem","value":"harem"},{"label":"Historical","value":"historical"},{"label":"Horror","value":"horror"},{"label":"Josei","value":"josei"},{"label":"Lolicon","value":"lolicon"},{"label":"Magical Realism","value":"magical-realism"},{"label":"Martial Arts","value":"martial-arts"},{"label":"Mature","value":"mature"},{"label":"Mecha","value":"mecha"},{"label":"Mystery","value":"mystery"},{"label":"Psychological","value":"psychological"},{"label":"Romance","value":"romance"},{"label":"School Life","value":"school-life"},{"label":"Sci-fi","value":"sci-fi"},{"label":"Seinen","value":"seinen"},{"label":"Shoujo","value":"shoujo"},{"label":"Shounen","value":"shounen"},{"label":"Shounen Ai","value":"shounen-ai"},{"label":"Slice of Life","value":"slice-of-life"},{"label":"Smut","value":"smut"},{"label":"Sports","value":"sports"},{"label":"Supernatural","value":"supernatural"},{"label":"Tragedy","value":"tragedy"},{"label":"Video Games","value":"video-games"},{"label":"Wuxia","value":"wuxia"},{"label":"Xianxia","value":"xianxia"},{"label":"Xuanhuan","value":"xuanhuan"},{"label":"Yaoi","value":"yaoi"}], "inputType":FilterInputs.Picker}];
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://www.lunarletters.com/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "series" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "novel-genre/" + filters.genres + '/';
} else {
url += "series/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [{"key":"sort","label":"Order by","values":[{"label":"Rating","value":"rating"},{"label":"A-Z","value":"alphabet"},{"label":"Latest","value":"latest"},{"label":"Most Views","value":"views"},{"label":"New","value":"new-manga"},{"label":"Trending","value":"trending"}],"inputType":FilterInputs.Picker}];
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://mtlnovel.club/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "novel" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "novel-genre/" + filters.genres + '/';
} else {
url += "novel/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [];
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://mtl-novel.com/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "novel" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "manga-genre/" + filters.genres + '/';
} else {
url += "novel/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [{"key":"sort","label":"Order by","values":[{"label":"Rating","value":"rating"},{"label":"A-Z","value":"alphabet"},{"label":"Latest","value":"latest"},{"label":"Most Views","value":"views"},{"label":"New","value":"new-manga"},{"label":"Trending","value":"trending"}],"inputType":FilterInputs.Picker},{"key":"genres","label":"GENRES","values":[{"label":"Action","value":"action"},{"label":"Adult","value":"adult"},{"label":"Adventure","value":"adventure"},{"label":"Chinese","value":"chinese"},{"label":"Comedy","value":"comedy"},{"label":"Conan","value":"conan"},{"label":"Drama","value":"drama"},{"label":"Erciyuan","value":"erciyuan"},{"label":"Fairy Tail","value":"fairy-tail"},{"label":"Faloo","value":"faloo"},{"label":"Fan-Fiction","value":"fan-fiction"},{"label":"Fantasy","value":"fantasy"},{"label":"FoodWars!","value":"foodwars"},{"label":"Game","value":"game"},{"label":"Gender Bender","value":"gender-bender"},{"label":"Harem","value":"harem"},{"label":"Historical","value":"historical"},{"label":"Horror","value":"horror"},{"label":"Hunter x Hunter","value":"hunter-x-hunter"},{"label":"Japanese","value":"japanese"},{"label":"Jojo","value":"jojo"},{"label":"Josei","value":"josei"},{"label":"Korean","value":"korean"},{"label":"Martial Arts","value":"martial-arts"},{"label":"Marvel","value":"marvel"},{"label":"Mature","value":"mature"},{"label":"Mecha","value":"mecha"},{"label":"Military","value":"military"},{"label":"Mystery","value":"mystery"},{"label":"Naruto","value":"naruto"},{"label":"One piece","value":"one-piece"},{"label":"Pokemon","value":"pokemon"},{"label":"Psychological","value":"psychological"},{"label":"Romance","value":"romance"},{"label":"School Life","value":"school-life"},{"label":"Sci-fi","value":"sci-fi"},{"label":"Seinen","value":"seinen"},{"label":"Shoujo","value":"shoujo"},{"label":"Shoujo Ai","value":"shoujo-ai"},{"label":"Shounen Ai","value":"shounen-ai"},{"label":"Slice of Life","value":"slice-of-life"},{"label":"Smut","value":"smut"},{"label":"Sport","value":"sport"},{"label":"Sports","value":"sports"},{"label":"Supernatural","value":"supernatural"},{"label":"System","value":"system"},{"label":"Tragedy","value":"tragedy"},{"label":"Urban","value":"urban"},{"label":"Urban Life","value":"urban-life"},{"label":"Wuxia","value":"wuxia"},{"label":"Xianxia","value":"xianxia"},{"label":"Xuanhuan","value":"xuanhuan"},{"label":"Yaoi","value":"yaoi"},{"label":"Yuri","value":"yuri"}],"inputType":FilterInputs.Picker}];
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://mostnovel.com/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "manga" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "manga-genre/" + filters.genres + '/';
} else {
url += "manga/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [{"key":"sort","label":"Order by","values":[{"label":"Rating","value":"rating"},{"label":"A-Z","value":"alphabet"},{"label":"Latest","value":"latest"},{"label":"Most Views","value":"views"},{"label":"New","value":"new-manga"},{"label":"Trending","value":"trending"}],"inputType":FilterInputs.Picker},{"key":"genres","label":"GENRES","values":[{"label":"ACG","value":"acg"},{"label":"Action","value":"action"},{"label":"Adult","value":"adult"},{"label":"Adventure","value":"adventure"},{"label":"AGA","value":"aga"},{"label":"Anime","value":"anime"},{"label":"Anime & Comics","value":"anime-comics"},{"label":"Bender","value":"bender"},{"label":"BL","value":"bl"},{"label":"Cartoon","value":"cartoon"},{"label":"Comedy","value":"comedy"},{"label":"Comic","value":"comic"},{"label":"Contemporary Romance","value":"contemporary-romance"},{"label":"Cooking","value":"cooking"},{"label":"Cultivation","value":"cultivation"},{"label":"Detective","value":"detective"},{"label":"Doujinshi","value":"doujinshi"},{"label":"Drama","value":"drama"},{"label":"Eastern Fantasy","value":"eastern-fantasy"},{"label":"Ecchi","value":"ecchi"},{"label":"Fantasy","value":"fantasy"},{"label":"Gender Bender","value":"gender-bender"},{"label":"Harem","value":"harem"},{"label":"Historical","value":"historical"},{"label":"Horror","value":"horror"},{"label":"Horror&Thriller","value":"horrorthriller"},{"label":"Josei","value":"josei"},{"label":"Live action","value":"live-action"},{"label":"Magical Realism","value":"magical-realism"},{"label":"Manga","value":"manga"},{"label":"Manhua","value":"manhua"},{"label":"Manhwa","value":"manhwa"},{"label":"Martial Arts","value":"martial-arts"},{"label":"Mature","value":"mature"},{"label":"Mecha","value":"mecha"},{"label":"Modern","value":"modern"},{"label":"Movies","value":"movies"},{"label":"Mystery","value":"mystery"},{"label":"One shot","value":"one-shot"},{"label":"Psychological","value":"psychological"},{"label":"Romance","value":"romance"},{"label":"School Life","value":"school-life"},{"label":"Sci-fi","value":"sci-fi"},{"label":"Seinen","value":"seinen"},{"label":"Shoujo","value":"shoujo"},{"label":"Shoujo Ai","value":"shoujo-ai"},{"label":"Shounen","value":"shounen"},{"label":"Shounen Ai","value":"shounen-ai"},{"label":"Slice of Life","value":"slice-of-life"},{"label":"Smart MC","value":"smart-mc"},{"label":"Smut","value":"smut"},{"label":"Soft Yaoi","value":"soft-yaoi"},{"label":"Soft Yuri","value":"soft-yuri"},{"label":"Sports","value":"sports"},{"label":"Supernatural","value":"supernatural"},{"label":"Tragedy","value":"tragedy"},{"label":"Urban Life","value":"urban-life"},{"label":"Video Games","value":"video-games"},{"label":"Webtoon","value":"webtoon"},{"label":"Wuxia","value":"wuxia"},{"label":"Xianxia","value":"xianxia"},{"label":"Xuanhuan","value":"xuanhuan"},{"label":"Yaoi","value":"yaoi"},{"label":"Yuri","value":"yuri"}],"inputType":FilterInputs.Picker}];
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://mysticalmerries.com/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "series" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "genre/" + filters.genres + '/';
} else {
url += "series/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [{"key":"sort","label":"Order by","values":[{"label":"Rating","value":"rating"},{"label":"A-Z","value":"alphabet"},{"label":"Latest","value":"latest"},{"label":"Most Views","value":"views"},{"label":"New","value":"new-manga"},{"label":"Trending","value":"trending"}],"inputType":FilterInputs.Picker},{"key":"genres","label":"GENRES","values":[{"label":"Action","value":"action"},{"label":"Adaptation","value":"adaptation"},{"label":"Adventure","value":"adventure"},{"label":"bilibili","value":"bilibili"},{"label":"Chinese Novel","value":"chinese-novel"},{"label":"Comedy","value":"comedy"},{"label":"Crossdressing","value":"crossdressing"},{"label":"Drama","value":"drama"},{"label":"Dropped","value":"dropped"},{"label":"Family","value":"family"},{"label":"Fantasy","value":"fantasy"},{"label":"Gender Bender","value":"gender-bender"},{"label":"Historical","value":"historical"},{"label":"Horror","value":"horror"},{"label":"Isekai","value":"isekai"},{"label":"Korean Novel","value":"korean-novell"},{"label":"Manga","value":"manga"},{"label":"Manhua","value":"manhua"},{"label":"Manhwa","value":"manhwa"},{"label":"Modern Romance","value":"modern-romance"},{"label":"Mystery","value":"mystery"},{"label":"Office Workers","value":"office-workers"},{"label":"One shot","value":"one-shot"},{"label":"Pilot Novel","value":"pilot-novel"},{"label":"R15","value":"r15"},{"label":"R19","value":"r19"},{"label":"Regression","value":"regression"},{"label":"Reincarnation","value":"reincarnation"},{"label":"Reverse Harem","value":"reverse-harem"},{"label":"Romance Fantasy","value":"romance-fantasy"},{"label":"School Life","value":"school-life"},{"label":"Sci-fi","value":"sci-fi"},{"label":"Slice of Life","value":"slice-of-life"},{"label":"Smut","value":"smut"},{"label":"Supernatural","value":"supernatural"},{"label":"Violence","value":"violence"}],"inputType":FilterInputs.Picker}];
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://www.neosekaitranslations.com/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "novel" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "novel-genre/" + filters.genres + '/';
} else {
url += "novel/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [{"key":"sort","label":"Order by","values":[{"label":"Rating","value":"rating"},{"label":"A-Z","value":"alphabet"},{"label":"Latest","value":"latest"},{"label":"Most Views","value":"views"},{"label":"New","value":"new-manga"},{"label":"Trending","value":"trending"}],"inputType":FilterInputs.Picker},{"key":"genres","label":"GENRES","values":[{"label":"Action","value":"action"},{"label":"Adventure","value":"adventure"},{"label":"Comedy","value":"comedy"},{"label":"Drama","value":"drama"},{"label":"Fantasy","value":"fantasy"},{"label":"Harem","value":"harem"},{"label":"Horror","value":"horror"},{"label":"Mature","value":"mature"},{"label":"Mecha","value":"mecha"},{"label":"Mystery","value":"mystery"},{"label":"Psychological","value":"psychological"},{"label":"Romance","value":"romance"},{"label":"School Life","value":"school-life"},{"label":"Sci-Fi","value":"sci-fi"},{"label":"Slice of Life","value":"slice-of-life"}],"inputType":FilterInputs.Picker}];
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://nocturnetls.net/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "novels" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "manga-genre/" + filters.genres + '/';
} else {
url += "novels/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [{"key":"sort","label":"Order by","values":[{"label":"Rating","value":"rating"},{"label":"A-Z","value":"alphabet"},{"label":"Latest","value":"latest"},{"label":"Most Views","value":"views"},{"label":"New","value":"new-manga"},{"label":"Trending","value":"trending"}],"inputType":FilterInputs.Picker},{"key":"genres","label":"GENRES","values":[{"label":"Action","value":"action"},{"label":"Adult","value":"adult"},{"label":"Adventure","value":"adventure"},{"label":"Anime","value":"anime"},{"label":"Cartoon","value":"cartoon"},{"label":"Comedy","value":"comedy"},{"label":"Comic","value":"comic"},{"label":"Cooking","value":"cooking"},{"label":"Detective","value":"detective"},{"label":"Doujinshi","value":"doujinshi"},{"label":"Drama","value":"drama"},{"label":"Ecchi","value":"ecchi"},{"label":"Fantasy","value":"fantasy"},{"label":"Gender Bender","value":"gender-bender"},{"label":"Harem","value":"harem"},{"label":"Historical","value":"historical"},{"label":"Horror","value":"horror"},{"label":"Josei","value":"josei"},{"label":"Live action","value":"live-action"},{"label":"Manga","value":"manga"},{"label":"Manhua","value":"manhua"},{"label":"Manhwa","value":"manhwa"},{"label":"Martial Arts","value":"martial-arts"},{"label":"Mature","value":"mature"},{"label":"Mecha","value":"mecha"},{"label":"Mystery","value":"mystery"},{"label":"One shot","value":"one-shot"},{"label":"Psychological","value":"psychological"},{"label":"Romance","value":"romance"},{"label":"School Life","value":"school-life"},{"label":"Sci-fi","value":"sci-fi"},{"label":"Seinen","value":"seinen"},{"label":"Shoujo","value":"shoujo"},{"label":"Shoujo Ai","value":"shoujo-ai"},{"label":"Shounen","value":"shounen"},{"label":"Shounen Ai","value":"shounen-ai"},{"label":"Slice of Life","value":"slice-of-life"},{"label":"Smut","value":"smut"},{"label":"Soft Yaoi","value":"soft-yaoi"},{"label":"Soft Yuri","value":"soft-yuri"},{"label":"Sports","value":"sports"},{"label":"Supernatural","value":"supernatural"},{"label":"Tragedy","value":"tragedy"},{"label":"Webtoon","value":"webtoon"},{"label":"Yaoi","value":"yaoi"},{"label":"Yuri","value":"yuri"}],"inputType":FilterInputs.Picker}];
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://noobchan.xyz/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "novel" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "novel-genre/" + filters.genres + '/';
} else {
url += "novel/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [];
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://www.novelmultiverse.com/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "novel" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "novel-genre/" + filters.genres + '/';
} else {
url += "novel/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [{"key":"sort","label":"Order by","values":[{"label":"Rating","value":"rating"},{"label":"A-Z","value":"alphabet"},{"label":"Latest","value":"latest"},{"label":"Most Views","value":"views"},{"label":"New","value":"new-manga"},{"label":"Trending","value":"trending"}],"inputType":FilterInputs.Picker},{"key":"genres","label":"GENRES","values":[{"label":"Action","value":"action"},{"label":"Adult","value":"adult"},{"label":"Adventure","value":"adventure"},{"label":"Anime","value":"anime"},{"label":"Cartoon","value":"cartoon"},{"label":"Comedy","value":"comedy"},{"label":"Comic","value":"comic"},{"label":"Cooking","value":"cooking"},{"label":"Detective","value":"detective"},{"label":"Doujinshi","value":"doujinshi"},{"label":"Drama","value":"drama"},{"label":"Ecchi","value":"ecchi"},{"label":"Fantasy","value":"fantasy"},{"label":"Gender Bender","value":"gender-bender"},{"label":"Harem","value":"harem"},{"label":"Historical","value":"historical"},{"label":"Horror","value":"horror"},{"label":"Josei","value":"josei"},{"label":"Live action","value":"live-action"},{"label":"Manga","value":"manga"},{"label":"Manhua","value":"manhua"},{"label":"Manhwa","value":"manhwa"},{"label":"Martial Arts","value":"martial-arts"},{"label":"Mature","value":"mature"},{"label":"Mecha","value":"mecha"},{"label":"Mystery","value":"mystery"},{"label":"One shot","value":"one-shot"},{"label":"Original","value":"original"},{"label":"Psychological","value":"psychological"},{"label":"Romance","value":"romance"},{"label":"School Life","value":"school-life"},{"label":"Sci-fi","value":"sci-fi"},{"label":"Seinen","value":"seinen"},{"label":"Shoujo","value":"shoujo"},{"label":"Shoujo Ai","value":"shoujo-ai"},{"label":"Shounen","value":"shounen"},{"label":"Shounen Ai","value":"shounen-ai"},{"label":"Slice of Life","value":"slice-of-life"},{"label":"Smut","value":"smut"},{"label":"Soft Yaoi","value":"soft-yaoi"},{"label":"Soft Yuri","value":"soft-yuri"},{"label":"Sports","value":"sports"},{"label":"Supernatural","value":"supernatural"},{"label":"Tragedy","value":"tragedy"},{"label":"Translation","value":"translation"},{"label":"Webtoon","value":"webtoon"},{"label":"Wuxia","value":"wuxia"},{"label":"Xianxia","value":"xianxia"},{"label":"Xuanhuan","value":"xuanhuan"},{"label":"Yaoi","value":"yaoi"},{"label":"Yuri","value":"yuri"}],"inputType":FilterInputs.Picker}];
+16 -8
View File
@@ -2,31 +2,37 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
import dayjs from "dayjs";
export const id = "novelr18";
export const name = "NovelR18 [madara]";
export const name = "NovelR18 [madara]";
export const icon = "multisrc/madara/icons/novelr18.png";
export const version = "1.0.0";
export const site = "https://novelr18.com/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "novel" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "novel-genre/" + filters.genres + '/';
} else {
url += "novel/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [{"key":"sort","label":"Sort by :","values":[{"label":"Rating","value":"rating"},{"label":"A-Z","value":"alphabet"},{"label":"Latest Update","value":"latest"},{"label":"Most Views","value":"views"},{"label":"Newly Added Novels","value":"new-manga"},{"label":"Trending","value":"trending"}],"inputType":FilterInputs.Picker}];
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://noveltranslate.com/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "all-novels" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "manga-genre/" + filters.genres + '/';
} else {
url += "all-novels/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [{"key":"sort","label":"Order by","values":[{"label":"Rating","value":"rating"},{"label":"A-Z","value":"alphabet"},{"label":"Latest","value":"latest"},{"label":"Most Views","value":"views"},{"label":"New","value":"new-manga"},{"label":"Trending","value":"trending"}],"inputType":FilterInputs.Picker},{"key":"genres","label":"GENRES","values":[{"label":"Action","value":"action"},{"label":"Adult","value":"adult"},{"label":"Adventure","value":"adventure"},{"label":"Bleach","value":"bleach"},{"label":"Chinese","value":"chinese"},{"label":"Comedy","value":"comedy"},{"label":"Conan","value":"conan"},{"label":"cooking","value":"cooking"},{"label":"Dragon Ball","value":"dragon-ball"},{"label":"Drama","value":"drama"},{"label":"Ecchi","value":"ecchi"},{"label":"Erciyuan","value":"erciyuan"},{"label":"Fairy Tail","value":"fairy-tail"},{"label":"Faloo","value":"faloo"},{"label":"Fan-Fiction","value":"fan-fiction"},{"label":"Fantasy","value":"fantasy"},{"label":"FoodWars!","value":"foodwars"},{"label":"Game","value":"game"},{"label":"Gender Bender","value":"gender-bender"},{"label":"Harem","value":"harem"},{"label":"Historical","value":"historical"},{"label":"Horror","value":"horror"},{"label":"Hunter x Hunter","value":"hunter-x-hunter"},{"label":"Isekai","value":"isekai"},{"label":"Japanese","value":"japanese"},{"label":"Jojo","value":"jojo"},{"label":"Josei","value":"josei"},{"label":"Korean","value":"korean"},{"label":"Martial Arts","value":"martial-arts"},{"label":"Marvel","value":"marvel"},{"label":"Mature","value":"mature"},{"label":"Mecha","value":"mecha"},{"label":"Military","value":"military"},{"label":"Mystery","value":"mystery"},{"label":"Naruto","value":"naruto"},{"label":"One piece","value":"one-piece"},{"label":"Pokemon","value":"pokemon"},{"label":"Political","value":"political"},{"label":"Psychological","value":"psychological"},{"label":"Romance","value":"romance"},{"label":"School Life","value":"school-life"},{"label":"Sci-fi","value":"sci-fi"},{"label":"Seinen","value":"seinen"},{"label":"Shoujo","value":"shoujo"},{"label":"Shoujo Ai","value":"shoujo-ai"},{"label":"Shounen","value":"shounen"},{"label":"Shounen Ai","value":"shounen-ai"},{"label":"Slice of Life","value":"slice-of-life"},{"label":"Smut","value":"smut"},{"label":"Sport","value":"sport"},{"label":"Sports","value":"sports"},{"label":"Supernatural","value":"supernatural"},{"label":"System","value":"system"},{"label":"Toriko","value":"toriko"},{"label":"Tragedy","value":"tragedy"},{"label":"Urban","value":"urban"},{"label":"Urban Life","value":"urban-life"},{"label":"Wuxia","value":"wuxia"},{"label":"Xianxia","value":"xianxia"},{"label":"Xuanhuan","value":"xuanhuan"},{"label":"Yaoi","value":"yaoi"},{"label":"Yuri","value":"yuri"}],"inputType":FilterInputs.Picker}];
+192 -194
View File
@@ -1,197 +1,195 @@
import { load as parseHTML } from "cheerio";
// import dayjs from 'dayjs';
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
// import { parseMadaraDate } from "@libs/parseMadaraDate";
// import { isUrlAbsolute } from '@libs/isAbsoluteUrl';
// import { showToast } from "@libs/showToast";
// import { Filter, FilterInputs } from "@libs/filterInputs";
// import { NovelStatus } from '@libs/novelStatus';
// import { defaultCover } from "@libs/defaultCover";
export const id = "Novelmt.com";
export const name = "Novelmt.com";
export const icon = "multisrc/readwn/icon/novelmt.png";
export const version = "1.0.0";
export const site = "https://www.novelmt.com/";
// export const filters: Filter[] = [];
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async function (
page,
{ filters, showLatestNovels }
) {
const novels: Novel.Item[] = [];
const pageNo = page - 1;
const url = baseUrl + 'list/all/all-onclick-' + pageNo +'.html';
const result = await fetchApi(url);
const body = await result.text();
const loadedCheerio = parseHTML(body);
loadedCheerio('li.novel-item').each(function () {
const novelName = loadedCheerio(this).find('h4').text();
const novelUrl = baseUrl + loadedCheerio(this).find('a').attr('href');
const coverUri = loadedCheerio(this)
.find('.novel-cover > img')
.attr('data-src');
const novelCover = baseUrl + coverUri;
const novel = { name: novelName, cover: novelCover, url: novelUrl };
novels.push(novel);
});
return novels;
import { load as parseHTML } from "cheerio";
// import dayjs from 'dayjs';
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { parseMadaraDate } from "@libs/parseMadaraDate";
// import { isUrlAbsolute } from '@libs/isAbsoluteUrl';
// import { showToast } from "@libs/showToast";
import { FilterInputs } from "@libs/filterInputs";
// import { NovelStatus } from '@libs/novelStatus';
// import { defaultCover } from "@libs/defaultCover";
export const id = "Novelmt.com";
export const name = "Novelmt.com";
export const icon = "multisrc/readwn/icons/novelmt.png";
export const version = "1.0.0";
export const site = "https://www.novelmt.com/";
export const popularNovels: Plugin.popularNovels = async function (
page,
{ filters, showLatestNovels }
) {
const novels: Novel.Item[] = [];
const pageNo = page - 1;
let url = site + 'list/';
url += (filters?.genres || 'all') + '/';
url += (filters?.status || 'all') + '-';
url += (showLatestNovels ? 'lastdotime' : filters?.sort || 'newstime') + '-';
url += pageNo + '.html';
const result = await fetchApi(url);
const body = await result.text();
const loadedCheerio = parseHTML(body);
loadedCheerio('li.novel-item').each(function () {
const novelName = loadedCheerio(this).find('h4').text();
const novelUrl = site + loadedCheerio(this).find('a').attr('href');
const coverUri = loadedCheerio(this)
.find('.novel-cover > img')
.attr('data-src');
const novelCover = site + coverUri;
const novel = { name: novelName, cover: novelCover, url: novelUrl };
novels.push(novel);
});
return novels;
};
export const parseNovelAndChapters: Plugin.parseNovelAndChapters =
async function (novelUrl) {
const result = await fetchApi(novelUrl);
const body = await result.text();
let loadedCheerio = parseHTML(body);
const novel: Novel.instance = {
url: novelUrl,
chapters: [],
};
export const parseNovelAndChapters: Plugin.parseNovelAndChapters =
async function (novelUrl) {
const result = await fetchApi(novelUrl);
const body = await result.text();
let loadedCheerio = parseHTML(body);
const novel: Novel.instance = {
url: novelUrl,
chapters: [],
};
novel.name = loadedCheerio('h1.novel-title').text();
const coverUri = loadedCheerio('figure.cover > img').attr('data-src');
novel.cover = baseUrl + coverUri;
novel.summary = loadedCheerio('.summary')
.text()
.replace('Summary', '')
.trim();
novel.genres = '';
loadedCheerio('div.categories > ul > li').each(function () {
novel.genres += loadedCheerio(this).text().trim() + ',';
});
loadedCheerio('div.header-stats > span').each(function () {
if (loadedCheerio(this).find('small').text() === 'Status') {
novel.status = loadedCheerio(this).find('strong').text();
}
});
novel.genres = novel.genres.slice(0, -1);
novel.author = loadedCheerio('span[itemprop=author]').text();
let novelChapters: Chapter.Item[] = [];
const novelId = novelUrl.replace('.html', '').replace(baseUrl, '');
const latestChapterNo = parseInt(loadedCheerio('.header-stats')
.find('span > strong')
.first()
.text()
.trim());
let lastChapterNo = 1;
loadedCheerio('.chapter-list li').each(function () {
const chapterName = loadedCheerio(this)
.find('a .chapter-title')
.text()
.trim();
const chapterUrl = baseUrl + loadedCheerio(this).find('a').attr('href')?.trim();
const releaseDate = loadedCheerio(this)
.find('a .chapter-update')
.text()
.trim();
lastChapterNo = parseInt(loadedCheerio(this).find('a .chapter-no').text().trim());
const chapter = { name: chapterName, releaseTime: releaseDate, url: chapterUrl };
novelChapters.push(chapter);
});
// Itterate once more before loop to finish off
lastChapterNo++;
for (let i = lastChapterNo; i <= latestChapterNo; i++) {
const chapterName = 'Chapter ' + i;
const chapterUrl = baseUrl + novelId+'_'+ i +'.html';
const releaseDate = null;
const chapter = { name: chapterName, releaseTime: releaseDate,url: chapterUrl };
novelChapters.push(chapter);
}
novel.chapters = novelChapters;
return novel;
};
export const parseChapter: Plugin.parseChapter = async function (chapterUrl) {
const result = await fetchApi(chapterUrl);
const body = await result.text();
const loadedCheerio = parseHTML(body);
const chapterText = loadedCheerio('.chapter-content').html();
return chapterText;
novel.name = loadedCheerio('h1.novel-title').text();
const coverUri = loadedCheerio('figure.cover > img').attr('data-src');
novel.cover = site + coverUri;
novel.summary = loadedCheerio('.summary')
.text()
.replace('Summary', '')
.trim();
novel.genres = '';
loadedCheerio('div.categories > ul > li').each(function () {
novel.genres += loadedCheerio(this).text().trim() + ',';
});
loadedCheerio('div.header-stats > span').each(function () {
if (loadedCheerio(this).find('small').text() === 'Status') {
novel.status = loadedCheerio(this).find('strong').text();
}
});
novel.genres = novel.genres.slice(0, -1);
novel.author = loadedCheerio('span[itemprop=author]').text();
let novelChapters: Chapter.Item[] = [];
const novelId = novelUrl.replace('.html', '').replace(site, '');
const latestChapterNo = parseInt(loadedCheerio('.header-stats')
.find('span > strong')
.first()
.text()
.trim());
let lastChapterNo = 1;
loadedCheerio('.chapter-list li').each(function () {
const chapterName = loadedCheerio(this)
.find('a .chapter-title')
.text()
.trim();
const chapterUrl = site + loadedCheerio(this).find('a').attr('href')?.trim();
const releaseDate = loadedCheerio(this)
.find('a .chapter-update')
.text()
.trim();
lastChapterNo = parseInt(loadedCheerio(this).find('a .chapter-no').text().trim());
const chapter = { name: chapterName, releaseTime: parseMadaraDate(releaseDate), url: chapterUrl };
novelChapters.push(chapter);
});
// Itterate once more before loop to finish off
lastChapterNo++;
for (let i = lastChapterNo; i <= latestChapterNo; i++) {
const chapterName = 'Chapter ' + i;
const chapterUrl = site + novelId+'_'+ i +'.html';
const releaseDate = null;
const chapter = { name: chapterName, releaseTime: releaseDate,url: chapterUrl };
novelChapters.push(chapter);
}
novel.chapters = novelChapters;
return novel;
};
export const parseChapter: Plugin.parseChapter = async function (chapterUrl) {
const result = await fetchApi(chapterUrl);
const body = await result.text();
const loadedCheerio = parseHTML(body);
const chapterText = loadedCheerio('.chapter-content').html();
return chapterText;
};
export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
const novels: Novel.Item[] = [];
const searchUrl = site + 'e/search/index.php';
const result = await fetchApi(searchUrl, {
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
Referer: site + 'search.html',
Origin: site,
'user-agent':
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36',
},
method: 'POST',
body: JSON.stringify({
show: 'title',
tempid: 1,
tbname: 'news',
keyboard: searchTerm,
}),
});
const body = await result.text();
const loadedCheerio = parseHTML(body);
loadedCheerio('li.novel-item').each(function () {
const novelName = loadedCheerio(this).find('h4').text();
const novelUrl = site + loadedCheerio(this).find('a').attr('href');
const coverUri = site + loadedCheerio(this).find('img').attr('data-src');
const novelCover = site + coverUri;
const novel = {
name: novelName,
cover: novelCover,
url: novelUrl,
};
export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
const novels: Novel.Item[] = [];
const searchUrl = baseUrl + 'e/search/index.php';
const result = await fetchApi(searchUrl, {
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
Referer: baseUrl + 'search.html',
Origin: baseUrl,
'user-agent':
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36',
},
method: 'POST',
body: JSON.stringify({
show: 'title',
tempid: 1,
tbname: 'news',
keyboard: searchTerm,
}),
});
const body = await result.text();
const loadedCheerio = parseHTML(body);
loadedCheerio('li.novel-item').each(function () {
const novelName = loadedCheerio(this).find('h4').text();
const novelUrl = baseUrl + loadedCheerio(this).find('a').attr('href');
const coverUri = baseUrl + loadedCheerio(this).find('img').attr('data-src');
const novelCover = baseUrl + coverUri;
const novel = {
name: novelName,
cover: novelCover,
url: novelUrl,
};
novels.push(novel);
});
return novels;
};
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url, {});
};
novels.push(novel);
});
return novels;
};
export const fetchImage: Plugin.fetchImage = fetchFile;
export const filters = [{"key":"sort","label":"Sort By","values":[{"label":"New","value":"newstime"},{"label":"Popular","value":"onclick"},{"label":"Updates","value":"lastdotime"}], "inputType":FilterInputs.Picker},{"key":"status","label":"Status","values":[{"label":"All","value":"all"},{"label":"Completed","value":"Completed"},{"label":"Ongoing","value":"Ongoing"}], "inputType":FilterInputs.Picker},{"key":"genres","label":"Genre / Category","values":[{"label":"All","value":"all"},{"label":"Action","value":"action"},{"label":"Adult","value":"adult"},{"label":"Adventure","value":"adventure"},{"label":"Billionaire","value":"billionaire"},{"label":"CEO","value":"ceo"},{"label":"Chinese","value":"chinese"},{"label":"Comedy","value":"comedy"},{"label":"Contemporary Romance","value":"contemporary-romance"},{"label":"Drama","value":"drama"},{"label":"Eastern Fantasy","value":"eastern-fantasy"},{"label":"Ecchi","value":"ecchi"},{"label":"Erciyuan","value":"erciyuan"},{"label":"Faloo","value":"faloo"},{"label":"Fan-Fiction","value":"fan-fiction"},{"label":"Fantasy","value":"fantasy"},{"label":"Fantasy Romance","value":"fantasy-romance"},{"label":"Farming","value":"farming"},{"label":"Game","value":"game"},{"label":"Games","value":"games"},{"label":"Gay Romance","value":"gay-romance"},{"label":"Gender Bender","value":"gender-bender"},{"label":"Harem","value":"harem"},{"label":"Historical","value":"historical"},{"label":"Historical Romance","value":"historical-romance"},{"label":"Horror","value":"horror"},{"label":"Isekai","value":"isekai"},{"label":"Japanese","value":"japanese"},{"label":"Josei","value":"josei"},{"label":"Korean","value":"korean"},{"label":"Lolicon","value":"lolicon"},{"label":"Magic","value":"magic"},{"label":"Magical Realism","value":"magical-realism"},{"label":"Martial Arts","value":"martial-arts"},{"label":"Mature","value":"mature"},{"label":"Mecha","value":"mecha"},{"label":"Military","value":"military"},{"label":"Modern Life","value":"modern-life"},{"label":"Modern Romance","value":"modern-romance"},{"label":"Mystery","value":"mystery"},{"label":"Psychological","value":"psychological"},{"label":"Romance","value":"romance"},{"label":"Romantic","value":"romantic"},{"label":"School Life","value":"school-life"},{"label":"Sci-fi","value":"sci-fi"},{"label":"Seinen","value":"seinen"},{"label":"Shoujo","value":"shoujo"},{"label":"Shoujo Ai","value":"shoujo-ai"},{"label":"Shounen","value":"shounen"},{"label":"Shounen Ai","value":"shounen-ai"},{"label":"Slice of Life","value":"slice-of-life"},{"label":"Smut","value":"smut"},{"label":"Sports","value":"sports"},{"label":"Supernatural","value":"supernatural"},{"label":"Tragedy","value":"tragedy"},{"label":"Two-dimensional","value":"two-dimensional"},{"label":"Urban","value":"urban"},{"label":"Urban Life","value":"urban-life"},{"label":"Video Games","value":"video-games"},{"label":"Virtual Reality","value":"virtual-reality"},{"label":"Wuxia","value":"wuxia"},{"label":"Xianxia","value":"xianxia"},{"label":"Xuanhuan","value":"xuanhuan"},{"label":"Yaoi","value":"yaoi"},{"label":"Yuri","value":"yuri"}], "inputType":FilterInputs.Picker}];
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://novelroom.net/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "manga" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "novel-genre/" + filters.genres + '/';
} else {
url += "manga/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [];
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://novelstic.com/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "novel" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "novel-genre/" + filters.genres + '/';
} else {
url += "novel/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [{"key":"sort","label":"Order by","values":[{"label":"Rating","value":"rating"},{"label":"A-Z","value":"alphabet"},{"label":"Latest","value":"latest"},{"label":"Most Views","value":"views"},{"label":"New","value":"new-manga"},{"label":"Trending","value":"trending"}],"inputType":FilterInputs.Picker}];
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://www.onlymtl.com/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "novel" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "novel-genre/" + filters.genres + '/';
} else {
url += "novel/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [];
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://readwebnovels.net/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "novel" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "novel-genre/" + filters.genres + '/';
} else {
url += "novel/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [{"key":"sort","label":"Order by","values":[{"label":"Rating","value":"rating"},{"label":"A-Z","value":"alphabet"},{"label":"Latest","value":"latest"},{"label":"Most Views","value":"views"},{"label":"New","value":"new-manga"},{"label":"Trending","value":"trending"}],"inputType":FilterInputs.Picker}];
+192 -194
View File
@@ -1,197 +1,195 @@
import { load as parseHTML } from "cheerio";
// import dayjs from 'dayjs';
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
// import { parseMadaraDate } from "@libs/parseMadaraDate";
// import { isUrlAbsolute } from '@libs/isAbsoluteUrl';
// import { showToast } from "@libs/showToast";
// import { Filter, FilterInputs } from "@libs/filterInputs";
// import { NovelStatus } from '@libs/novelStatus';
// import { defaultCover } from "@libs/defaultCover";
export const id = "Readwn.com";
export const name = "Readwn.com";
export const icon = "multisrc/readwn/icon/readwn.png";
export const version = "1.0.0";
export const site = "https://www.readwn.com/";
// export const filters: Filter[] = [];
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async function (
page,
{ filters, showLatestNovels }
) {
const novels: Novel.Item[] = [];
const pageNo = page - 1;
const url = baseUrl + 'list/all/all-onclick-' + pageNo +'.html';
const result = await fetchApi(url);
const body = await result.text();
const loadedCheerio = parseHTML(body);
loadedCheerio('li.novel-item').each(function () {
const novelName = loadedCheerio(this).find('h4').text();
const novelUrl = baseUrl + loadedCheerio(this).find('a').attr('href');
const coverUri = loadedCheerio(this)
.find('.novel-cover > img')
.attr('data-src');
const novelCover = baseUrl + coverUri;
const novel = { name: novelName, cover: novelCover, url: novelUrl };
novels.push(novel);
});
return novels;
import { load as parseHTML } from "cheerio";
// import dayjs from 'dayjs';
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { parseMadaraDate } from "@libs/parseMadaraDate";
// import { isUrlAbsolute } from '@libs/isAbsoluteUrl';
// import { showToast } from "@libs/showToast";
import { FilterInputs } from "@libs/filterInputs";
// import { NovelStatus } from '@libs/novelStatus';
// import { defaultCover } from "@libs/defaultCover";
export const id = "Readwn.com";
export const name = "Readwn.com";
export const icon = "multisrc/readwn/icons/readwn.png";
export const version = "1.0.0";
export const site = "https://www.readwn.com/";
export const popularNovels: Plugin.popularNovels = async function (
page,
{ filters, showLatestNovels }
) {
const novels: Novel.Item[] = [];
const pageNo = page - 1;
let url = site + 'list/';
url += (filters?.genres || 'all') + '/';
url += (filters?.status || 'all') + '-';
url += (showLatestNovels ? 'lastdotime' : filters?.sort || 'newstime') + '-';
url += pageNo + '.html';
const result = await fetchApi(url);
const body = await result.text();
const loadedCheerio = parseHTML(body);
loadedCheerio('li.novel-item').each(function () {
const novelName = loadedCheerio(this).find('h4').text();
const novelUrl = site + loadedCheerio(this).find('a').attr('href');
const coverUri = loadedCheerio(this)
.find('.novel-cover > img')
.attr('data-src');
const novelCover = site + coverUri;
const novel = { name: novelName, cover: novelCover, url: novelUrl };
novels.push(novel);
});
return novels;
};
export const parseNovelAndChapters: Plugin.parseNovelAndChapters =
async function (novelUrl) {
const result = await fetchApi(novelUrl);
const body = await result.text();
let loadedCheerio = parseHTML(body);
const novel: Novel.instance = {
url: novelUrl,
chapters: [],
};
export const parseNovelAndChapters: Plugin.parseNovelAndChapters =
async function (novelUrl) {
const result = await fetchApi(novelUrl);
const body = await result.text();
let loadedCheerio = parseHTML(body);
const novel: Novel.instance = {
url: novelUrl,
chapters: [],
};
novel.name = loadedCheerio('h1.novel-title').text();
const coverUri = loadedCheerio('figure.cover > img').attr('data-src');
novel.cover = baseUrl + coverUri;
novel.summary = loadedCheerio('.summary')
.text()
.replace('Summary', '')
.trim();
novel.genres = '';
loadedCheerio('div.categories > ul > li').each(function () {
novel.genres += loadedCheerio(this).text().trim() + ',';
});
loadedCheerio('div.header-stats > span').each(function () {
if (loadedCheerio(this).find('small').text() === 'Status') {
novel.status = loadedCheerio(this).find('strong').text();
}
});
novel.genres = novel.genres.slice(0, -1);
novel.author = loadedCheerio('span[itemprop=author]').text();
let novelChapters: Chapter.Item[] = [];
const novelId = novelUrl.replace('.html', '').replace(baseUrl, '');
const latestChapterNo = parseInt(loadedCheerio('.header-stats')
.find('span > strong')
.first()
.text()
.trim());
let lastChapterNo = 1;
loadedCheerio('.chapter-list li').each(function () {
const chapterName = loadedCheerio(this)
.find('a .chapter-title')
.text()
.trim();
const chapterUrl = baseUrl + loadedCheerio(this).find('a').attr('href')?.trim();
const releaseDate = loadedCheerio(this)
.find('a .chapter-update')
.text()
.trim();
lastChapterNo = parseInt(loadedCheerio(this).find('a .chapter-no').text().trim());
const chapter = { name: chapterName, releaseTime: releaseDate, url: chapterUrl };
novelChapters.push(chapter);
});
// Itterate once more before loop to finish off
lastChapterNo++;
for (let i = lastChapterNo; i <= latestChapterNo; i++) {
const chapterName = 'Chapter ' + i;
const chapterUrl = baseUrl + novelId+'_'+ i +'.html';
const releaseDate = null;
const chapter = { name: chapterName, releaseTime: releaseDate,url: chapterUrl };
novelChapters.push(chapter);
}
novel.chapters = novelChapters;
return novel;
};
export const parseChapter: Plugin.parseChapter = async function (chapterUrl) {
const result = await fetchApi(chapterUrl);
const body = await result.text();
const loadedCheerio = parseHTML(body);
const chapterText = loadedCheerio('.chapter-content').html();
return chapterText;
novel.name = loadedCheerio('h1.novel-title').text();
const coverUri = loadedCheerio('figure.cover > img').attr('data-src');
novel.cover = site + coverUri;
novel.summary = loadedCheerio('.summary')
.text()
.replace('Summary', '')
.trim();
novel.genres = '';
loadedCheerio('div.categories > ul > li').each(function () {
novel.genres += loadedCheerio(this).text().trim() + ',';
});
loadedCheerio('div.header-stats > span').each(function () {
if (loadedCheerio(this).find('small').text() === 'Status') {
novel.status = loadedCheerio(this).find('strong').text();
}
});
novel.genres = novel.genres.slice(0, -1);
novel.author = loadedCheerio('span[itemprop=author]').text();
let novelChapters: Chapter.Item[] = [];
const novelId = novelUrl.replace('.html', '').replace(site, '');
const latestChapterNo = parseInt(loadedCheerio('.header-stats')
.find('span > strong')
.first()
.text()
.trim());
let lastChapterNo = 1;
loadedCheerio('.chapter-list li').each(function () {
const chapterName = loadedCheerio(this)
.find('a .chapter-title')
.text()
.trim();
const chapterUrl = site + loadedCheerio(this).find('a').attr('href')?.trim();
const releaseDate = loadedCheerio(this)
.find('a .chapter-update')
.text()
.trim();
lastChapterNo = parseInt(loadedCheerio(this).find('a .chapter-no').text().trim());
const chapter = { name: chapterName, releaseTime: parseMadaraDate(releaseDate), url: chapterUrl };
novelChapters.push(chapter);
});
// Itterate once more before loop to finish off
lastChapterNo++;
for (let i = lastChapterNo; i <= latestChapterNo; i++) {
const chapterName = 'Chapter ' + i;
const chapterUrl = site + novelId+'_'+ i +'.html';
const releaseDate = null;
const chapter = { name: chapterName, releaseTime: releaseDate,url: chapterUrl };
novelChapters.push(chapter);
}
novel.chapters = novelChapters;
return novel;
};
export const parseChapter: Plugin.parseChapter = async function (chapterUrl) {
const result = await fetchApi(chapterUrl);
const body = await result.text();
const loadedCheerio = parseHTML(body);
const chapterText = loadedCheerio('.chapter-content').html();
return chapterText;
};
export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
const novels: Novel.Item[] = [];
const searchUrl = site + 'e/search/index.php';
const result = await fetchApi(searchUrl, {
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
Referer: site + 'search.html',
Origin: site,
'user-agent':
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36',
},
method: 'POST',
body: JSON.stringify({
show: 'title',
tempid: 1,
tbname: 'news',
keyboard: searchTerm,
}),
});
const body = await result.text();
const loadedCheerio = parseHTML(body);
loadedCheerio('li.novel-item').each(function () {
const novelName = loadedCheerio(this).find('h4').text();
const novelUrl = site + loadedCheerio(this).find('a').attr('href');
const coverUri = site + loadedCheerio(this).find('img').attr('data-src');
const novelCover = site + coverUri;
const novel = {
name: novelName,
cover: novelCover,
url: novelUrl,
};
export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
const novels: Novel.Item[] = [];
const searchUrl = baseUrl + 'e/search/index.php';
const result = await fetchApi(searchUrl, {
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
Referer: baseUrl + 'search.html',
Origin: baseUrl,
'user-agent':
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36',
},
method: 'POST',
body: JSON.stringify({
show: 'title',
tempid: 1,
tbname: 'news',
keyboard: searchTerm,
}),
});
const body = await result.text();
const loadedCheerio = parseHTML(body);
loadedCheerio('li.novel-item').each(function () {
const novelName = loadedCheerio(this).find('h4').text();
const novelUrl = baseUrl + loadedCheerio(this).find('a').attr('href');
const coverUri = baseUrl + loadedCheerio(this).find('img').attr('data-src');
const novelCover = baseUrl + coverUri;
const novel = {
name: novelName,
cover: novelCover,
url: novelUrl,
};
novels.push(novel);
});
return novels;
};
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url, {});
};
novels.push(novel);
});
return novels;
};
export const fetchImage: Plugin.fetchImage = fetchFile;
export const filters = [{"key":"sort","label":"Sort By","values":[{"label":"New","value":"newstime"},{"label":"Popular","value":"onclick"},{"label":"Updates","value":"lastdotime"}], "inputType":FilterInputs.Picker},{"key":"status","label":"Status","values":[{"label":"All","value":"all"},{"label":"Completed","value":"Completed"},{"label":"Ongoing","value":"Ongoing"}], "inputType":FilterInputs.Picker},{"key":"genres","label":"Genre / Category","values":[{"label":"All","value":"all"},{"label":"Action","value":"action"},{"label":"Adventure","value":"adventure"},{"label":"Chinese","value":"chinese"},{"label":"Comedy","value":"comedy"},{"label":"Contemporary Romance","value":"contemporary-romance"},{"label":"Drama","value":"drama"},{"label":"Eastern Fantasy","value":"eastern-fantasy"},{"label":"Ecchi","value":"ecchi"},{"label":"Erciyuan","value":"erciyuan"},{"label":"Faloo","value":"faloo"},{"label":"Fan-Fiction","value":"fan-fiction"},{"label":"Fantasy","value":"fantasy"},{"label":"Fantasy Romance","value":"fantasy-romance"},{"label":"Game","value":"game"},{"label":"Gender Bender","value":"gender-bender"},{"label":"Harem","value":"harem"},{"label":"Hentai","value":"hentai"},{"label":"Historical","value":"historical"},{"label":"Horror","value":"horror"},{"label":"Isekai","value":"isekai"},{"label":"Japanese","value":"japanese"},{"label":"Josei","value":"josei"},{"label":"Korean","value":"korean"},{"label":"Lolicon","value":"lolicon"},{"label":"Magic","value":"magic"},{"label":"Magical Realism","value":"magical-realism"},{"label":"Martial Arts","value":"martial-arts"},{"label":"Mecha","value":"mecha"},{"label":"Military","value":"military"},{"label":"Mystery","value":"mystery"},{"label":"Official Circles","value":"official_circles"},{"label":"Psychological","value":"psychological"},{"label":"Romance","value":"romance"},{"label":"School Life","value":"school-life"},{"label":"Sci-fi","value":"sci-fi"},{"label":"Science Fiction","value":"science_fiction"},{"label":"Seinen","value":"seinen"},{"label":"Shoujo","value":"shoujo"},{"label":"Shoujo Ai","value":"shoujo-ai"},{"label":"Shounen","value":"shounen"},{"label":"Shounen Ai","value":"shounen-ai"},{"label":"Slice of Life","value":"slice-of-life"},{"label":"Sports","value":"sports"},{"label":"Supernatural","value":"supernatural"},{"label":"Suspense Thriller","value":"suspense_thriller"},{"label":"Tragedy","value":"tragedy"},{"label":"Travel Through Time","value":"travel_through_time"},{"label":"Two-dimensional","value":"two-dimensional"},{"label":"Urban","value":"urban"},{"label":"Urban Life","value":"urban-life"},{"label":"Video Games","value":"video-games"},{"label":"Virtual Reality","value":"virtual-reality"},{"label":"Wuxia","value":"wuxia"},{"label":"Wuxia Xianxia","value":"wuxia_xianxia"},{"label":"Xianxia","value":"xianxia"},{"label":"Xuanhuan","value":"xuanhuan"},{"label":"Yaoi","value":"yaoi"},{"label":"Yuri","value":"yuri"}], "inputType":FilterInputs.Picker}];
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://sleepytranslations.com/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "series" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "novel-genre/" + filters.genres + '/';
} else {
url += "series/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [{"key":"sort","label":"Order by","values":[{"label":"Rating","value":"rating"},{"label":"A-Z","value":"alphabet"},{"label":"Latest","value":"latest"},{"label":"Most Views","value":"views"},{"label":"New","value":"new-manga"},{"label":"Trending","value":"trending"}],"inputType":FilterInputs.Picker}];
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://www.sonicmtl.com/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "novel" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "novel-genre/" + filters.genres + '/';
} else {
url += "novel/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [{"key":"sort","label":"Order by","values":[{"label":"Rating","value":"rating"},{"label":"A-Z","value":"alphabet"},{"label":"Latest","value":"latest"},{"label":"Most Views","value":"views"},{"label":"New","value":"new-manga"},{"label":"Trending","value":"trending"}],"inputType":FilterInputs.Picker},{"key":"genres","label":"GENRES","values":[{"label":"Action","value":"action"},{"label":"Adult","value":"adult"},{"label":"Adventure","value":"adventure"},{"label":"Comedy","value":"comedy"},{"label":"Cooking","value":"cooking"},{"label":"Detective","value":"detective"},{"label":"Doujinshi","value":"doujinshi"},{"label":"Drama","value":"drama"},{"label":"Ecchi","value":"ecchi"},{"label":"Fan-Fiction","value":"fan-fiction"},{"label":"Fantasy","value":"fantasy"},{"label":"Gender Bender","value":"gender-bender"},{"label":"Harem","value":"harem"},{"label":"Historical","value":"historical"},{"label":"Horror","value":"horror"},{"label":"Josei","value":"josei"},{"label":"Live action","value":"live-action"},{"label":"Manga","value":"manga"},{"label":"Manhua","value":"manhua"},{"label":"Manhwa","value":"manhwa"},{"label":"Martial Arts","value":"martial-arts"},{"label":"Mature","value":"mature"},{"label":"Mecha","value":"mecha"},{"label":"Mystery","value":"mystery"},{"label":"One shot","value":"one-shot"},{"label":"Psychological","value":"psychological"},{"label":"Romance","value":"romance"},{"label":"School Life","value":"school-life"},{"label":"Sci-fi","value":"sci-fi"},{"label":"Seinen","value":"seinen"},{"label":"Shoujo","value":"shoujo"},{"label":"Shoujo Ai","value":"shoujo-ai"},{"label":"Shounen","value":"shounen"},{"label":"Shounen Ai","value":"shounen-ai"},{"label":"Slice of Life","value":"slice-of-life"},{"label":"Smut","value":"smut"},{"label":"Soft Yaoi","value":"soft-yaoi"},{"label":"Soft Yuri","value":"soft-yuri"},{"label":"Sports","value":"sports"},{"label":"Supernatural","value":"supernatural"},{"label":"Tragedy","value":"tragedy"},{"label":"Urban Life","value":"urban-life"},{"label":"Wuxia","value":"wuxia"},{"label":"Xianxia","value":"xianxia"},{"label":"Xuanhuan","value":"xuanhuan"},{"label":"Yaoi","value":"yaoi"},{"label":"Yuri","value":"yuri"}],"inputType":FilterInputs.Picker}];
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://sugarbbscan.com/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "series" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "novel-genre/" + filters.genres + '/';
} else {
url += "series/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [];
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://sweetescapetranslations.com/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "manga" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "manga-genre/" + filters.genres + '/';
} else {
url += "manga/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [{"key":"sort","label":"Order by","values":[{"label":"Rating","value":"rating"},{"label":"A-Z","value":"alphabet"},{"label":"Latest","value":"latest"},{"label":"Most Views","value":"views"},{"label":"New","value":"new-manga"},{"label":"Trending","value":"trending"}],"inputType":FilterInputs.Picker},{"key":"genres","label":"GENRES","values":[{"label":"Action","value":"action"},{"label":"Adult","value":"adult"},{"label":"Comedy","value":"comedy"},{"label":"Drama","value":"drama"},{"label":"Fantasy","value":"fantasy"},{"label":"Gender Bender","value":"gender-bender"},{"label":"Mature","value":"mature"},{"label":"Modern","value":"modern"},{"label":"Mystery","value":"mystery"},{"label":"R-15","value":"r-15"},{"label":"Romance","value":"romance"},{"label":"Slice of Life","value":"slice-of-life"}],"inputType":FilterInputs.Picker}];
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://www.webnovelover.com/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "novel" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "novel-genre/" + filters.genres + '/';
} else {
url += "novel/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [{"key":"sort","label":"Order by","values":[{"label":"Rating","value":"rating"},{"label":"A-Z","value":"alphabet"},{"label":"Latest","value":"latest"},{"label":"Most Views","value":"views"},{"label":"New","value":"new-manga"},{"label":"Trending","value":"trending"}],"inputType":FilterInputs.Picker},{"key":"genres","label":"GENRES","values":[{"label":"Action","value":"action"},{"label":"Adapted into drama","value":"adapted-into-drama"},{"label":"Adventure","value":"adventure"},{"label":"Comedy","value":"comedy"},{"label":"Completed","value":"completed"},{"label":"Drama","value":"drama"},{"label":"English Novel","value":"english-novel"},{"label":"Fantasy","value":"fantasy"},{"label":"Gender Bender","value":"gender-bender"},{"label":"Harem","value":"harem"},{"label":"Historical","value":"historical"},{"label":"Horror","value":"horror"},{"label":"Indo Novel","value":"indo-novel"},{"label":"Josei","value":"josei"},{"label":"Martial Arts","value":"martial-arts"},{"label":"Mature","value":"mature"},{"label":"Mystery","value":"mystery"},{"label":"Rebirth","value":"rebirth"},{"label":"Reincarnation","value":"reincarnation"},{"label":"Romance","value":"romance"},{"label":"Sci-fi","value":"sci-fi"},{"label":"Shoujo","value":"shoujo"},{"label":"Shounen","value":"shounen"},{"label":"Slice of Life","value":"slice-of-life"},{"label":"Spiritual","value":"spiritual"},{"label":"Supernatural","value":"supernatural"},{"label":"Tragedy","value":"tragedy"},{"label":"Transmigration","value":"transmigration"},{"label":"University","value":"university"},{"label":"Wuxia","value":"wuxia"},{"label":"Xianxia","value":"xianxia"},{"label":"Xuanhuan","value":"xuanhuan"},{"label":"Youth","value":"youth"}],"inputType":FilterInputs.Picker}];
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://wuxiaworld.site/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "novel" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "novel-genre/" + filters.genres + '/';
} else {
url += "novel/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [{"key":"sort","label":"Order by","values":[{"label":"Rating","value":"rating"},{"label":"A-Z","value":"alphabet"},{"label":"Latest","value":"latest"},{"label":"Most Views","value":"views"},{"label":"New","value":"new-manga"},{"label":"Trending","value":"trending"}],"inputType":FilterInputs.Picker}];
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://zetrotranslation.com/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "novel" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "genre/" + filters.genres + '/';
} else {
url += "novel/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [{"key":"sort","label":"Order by","values":[{"label":"Rating","value":"rating"},{"label":"A-Z","value":"alphabet"},{"label":"Latest","value":"latest"},{"label":"Most Views","value":"views"},{"label":"New","value":"new-manga"},{"label":"Trending","value":"trending"}],"inputType":FilterInputs.Picker},{"key":"genres","label":"GENRES","values":[{"label":"Action","value":"action"},{"label":"Adventure","value":"adventure"},{"label":"Comedy","value":"comedy"},{"label":"Dark Elf","value":"dark-elf"},{"label":"Drama","value":"drama"},{"label":"Ecchi","value":"ecchi"},{"label":"Fantasy","value":"fantasy"},{"label":"Harem","value":"harem"},{"label":"Horror","value":"horror"},{"label":"Isekai","value":"isekai"},{"label":"Mecha","value":"mecha"},{"label":"Mystery","value":"mystery"},{"label":"NTR","value":"ntr"},{"label":"Original Works","value":"original-works"},{"label":"Rom-Com","value":"rom-com"},{"label":"Romance","value":"romance"},{"label":"School","value":"school"},{"label":"Shoujo","value":"shoujo"},{"label":"Slice of Life","value":"slice-of-life"},{"label":"Villain","value":"villain"},{"label":"Yuri","value":"yuri"}],"inputType":FilterInputs.Picker}];
+15 -7
View File
@@ -2,6 +2,7 @@
import { load as parseHTML } from "cheerio";
import { fetchFile, fetchApi } from "@libs/fetch";
import { Novel, Plugin, Chapter } from "@typings/plugin";
import { FilterInputs } from "@libs/filterInputs";
import { defaultCover } from "@libs/defaultCover";
import { NovelStatus } from "@libs/novelStatus"
import { parseMadaraDate } from "@libs/parseMadaraDate";
@@ -14,19 +15,24 @@ export const version = "1.0.0";
export const site = "https://zinnovel.com/";
const baseUrl = site;
export const popularNovels: Plugin.popularNovels = async (pageNo, {showLatestNovels}) => {
export const popularNovels: Plugin.popularNovels = async (pageNo, {filters, showLatestNovels}) => {
const novels: Novel.Item[] = [];
const sortOrder = showLatestNovels
? '?m_orderby=latest'
: '/?m_orderby=rating';
let url = site + "manga" + '/page/' + pageNo + sortOrder;
let url = site;
if (filters?.genres) {
url += "manga-genre/" + filters.genres + '/';
} else {
url += "manga/";
}
url += '/page/' + pageNo + '/' +
'?m_orderby=' + (showLatestNovels ? 'latest' : (filters?.sort || 'rating'));
const body = await fetchApi(url).then(res => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('.manga-title-badges').remove();
loadedCheerio('.page-item-detail').each(function () {
@@ -202,4 +208,6 @@ export const searchNovels: Plugin.searchNovels = async (searchTerm) => {
export const fetchImage: Plugin.fetchImage = async (url) => {
return await fetchFile(url);
};
};
export const filters = [{"key":"sort","label":"Order by","values":[{"label":"Rating","value":"rating"},{"label":"A-Z","value":"alphabet"},{"label":"Latest","value":"latest"},{"label":"Most Views","value":"views"},{"label":"New","value":"new-manga"},{"label":"Trending","value":"trending"}],"inputType":FilterInputs.Picker},{"key":"genres","label":"GENRES","values":[{"label":"Action","value":"action"},{"label":"Adult","value":"adult"},{"label":"Adventure","value":"adventure"},{"label":"Anime","value":"anime"},{"label":"Cartoon","value":"cartoon"},{"label":"Comedy","value":"comedy"},{"label":"Comic","value":"comic"},{"label":"Cooking","value":"cooking"},{"label":"Detective","value":"detective"},{"label":"Doujinshi","value":"doujinshi"},{"label":"Drama","value":"drama"},{"label":"Ecchi","value":"ecchi"},{"label":"Fantasy","value":"fantasy"},{"label":"Game","value":"game"},{"label":"Gender Bender","value":"gender-bender"},{"label":"Harem","value":"harem"},{"label":"Historical","value":"historical"},{"label":"Horror","value":"horror"},{"label":"Isekai","value":"isekai"},{"label":"Josei","value":"josei"},{"label":"Live action","value":"live-action"},{"label":"Lolicon","value":"lolicon"},{"label":"Magical Realism","value":"magical-realism"},{"label":"Manga","value":"manga"},{"label":"Manhua","value":"manhua"},{"label":"Manhwa","value":"manhwa"},{"label":"Martial Arts","value":"martial-arts"},{"label":"Mature","value":"mature"},{"label":"Mecha","value":"mecha"},{"label":"Mystery","value":"mystery"},{"label":"One shot","value":"one-shot"},{"label":"Psychological","value":"psychological"},{"label":"Reincarnation","value":"reincarnation"},{"label":"Romance","value":"romance"},{"label":"School Life","value":"school-life"},{"label":"Sci-fi","value":"sci-fi"},{"label":"Seinen","value":"seinen"},{"label":"Shoujo","value":"shoujo"},{"label":"Shoujo Ai","value":"shoujo-ai"},{"label":"Shounen","value":"shounen"},{"label":"Shounen Ai","value":"shounen-ai"},{"label":"Slice of Life","value":"slice-of-life"},{"label":"Smut","value":"smut"},{"label":"Soft Yaoi","value":"soft-yaoi"},{"label":"Soft Yuri","value":"soft-yuri"},{"label":"Sports","value":"sports"},{"label":"Supernatural","value":"supernatural"},{"label":"Tragedy","value":"tragedy"},{"label":"Video Games","value":"video-games"},{"label":"Webtoon","value":"webtoon"},{"label":"Wuxia","value":"wuxia"},{"label":"Xianxia","value":"xianxia"},{"label":"Xuanhuan","value":"xuanhuan"},{"label":"Yaoi","value":"yaoi"},{"label":"Yuri","value":"yuri"}],"inputType":FilterInputs.Picker}];
+1 -1
View File
@@ -7,7 +7,7 @@ export const id = "DDL.com";
export const name = "Divine Dao Library";
export const site = "https://www.divinedaolibrary.com/";
export const version = "1.0.0";
export const icon = "src/`en/divinedaolibrary/icon.png";
export const icon = "src/en/divinedaolibrary/icon.png";
const baseUrl = site;