plugin refactoring (#639)
* fix * fix * madara plugins cleaned Error: net::ERR_NAME_NOT_RESOLVED at https://cratenovel.com/novel/page/1?m_orderby=latest Error: net::ERR_SSL_PROTOCOL_ERROR at https://clicknovel.net/novel/page/1?m_orderby=latest Error: net::ERR_NAME_NOT_RESOLVED at https://www.onlymtl.com/novel/page/1?m_orderby=latest Error: net::ERR_TOO_MANY_REDIRECTS at https://mtlnovel.club/novel/page/1?m_orderby=latest Error: net::ERR_NAME_NOT_RESOLVED at https://noobchan.xyz/novel/page/1?m_orderby=latest * readwn * .
This commit is contained in:
+148
-45
@@ -112,24 +112,6 @@
|
||||
"url": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/.js/plugins/english/BoxNovel[madara].js",
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/multisrc/madara/icons/boxnovel.png"
|
||||
},
|
||||
{
|
||||
"id": "clicknovel",
|
||||
"name": "ClickNovel[madara]",
|
||||
"site": "https://clicknovel.net/",
|
||||
"lang": "English",
|
||||
"version": "1.0.0",
|
||||
"url": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/.js/plugins/english/ClickNovel[madara].js",
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/multisrc/madara/icons/clicknovel.png"
|
||||
},
|
||||
{
|
||||
"id": "cratenovel",
|
||||
"name": "CrateNovel[madara]",
|
||||
"site": "https://cratenovel.com/",
|
||||
"lang": "English",
|
||||
"version": "1.0.0",
|
||||
"url": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/.js/plugins/english/CrateNovel[madara].js",
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/multisrc/madara/icons/cratenovel.png"
|
||||
},
|
||||
{
|
||||
"id": "daonovel",
|
||||
"name": "DaoNovel[madara]",
|
||||
@@ -175,6 +157,15 @@
|
||||
"url": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/.js/plugins/english/LightNovelHeaven[madara].js",
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/multisrc/madara/icons/lightnovelheaven.png"
|
||||
},
|
||||
{
|
||||
"id": "Ltnovel.com",
|
||||
"name": "Ltnovel[readwn]",
|
||||
"site": "https://www.ltnovel.com",
|
||||
"lang": "English",
|
||||
"version": "1.0.0",
|
||||
"url": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/.js/plugins/english/Ltnovel[readwn].js",
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/multisrc/readwn/icons/ltnovel.png"
|
||||
},
|
||||
{
|
||||
"id": "lunarletters",
|
||||
"name": "LunarLetters[madara]",
|
||||
@@ -202,15 +193,6 @@
|
||||
"url": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/.js/plugins/english/MTLNovel[madara].js",
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/multisrc/madara/icons/mtl-novel.png"
|
||||
},
|
||||
{
|
||||
"id": "mtlnovel.club",
|
||||
"name": "MTLNovel.Club[madara]",
|
||||
"site": "https://mtlnovel.club/",
|
||||
"lang": "English",
|
||||
"version": "1.0.0",
|
||||
"url": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/.js/plugins/english/MTLNovelClub[madara].js",
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/multisrc/madara/icons/mtlnovel.club.png"
|
||||
},
|
||||
{
|
||||
"id": "mysticalmerries",
|
||||
"name": "MysticalSeries[madara]",
|
||||
@@ -247,15 +229,6 @@
|
||||
"url": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/.js/plugins/english/NocturneTranslations[madara].js",
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/multisrc/madara/icons/nocturnetranslations.png"
|
||||
},
|
||||
{
|
||||
"id": "noobchanTL",
|
||||
"name": "Noobchan Translation[madara]",
|
||||
"site": "https://noobchan.xyz/",
|
||||
"lang": "English",
|
||||
"version": "1.0.0",
|
||||
"url": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/.js/plugins/english/NoobchanTranslation[madara].js",
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/multisrc/madara/icons/noobchantranslation.png"
|
||||
},
|
||||
{
|
||||
"id": "novelmultiverse",
|
||||
"name": "NovelMultiverse[madara]",
|
||||
@@ -301,15 +274,6 @@
|
||||
"url": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/.js/plugins/english/NovelTranslate[madara].js",
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/multisrc/madara/icons/noveltranslate.png"
|
||||
},
|
||||
{
|
||||
"id": "onlymtl",
|
||||
"name": "OnlyMTL[madara]",
|
||||
"site": "https://www.onlymtl.com/",
|
||||
"lang": "English",
|
||||
"version": "1.0.0",
|
||||
"url": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/.js/plugins/english/OnlyMTL[madara].js",
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/multisrc/madara/icons/onlymtl.png"
|
||||
},
|
||||
{
|
||||
"id": "pandamtl",
|
||||
"name": "PandaMTL",
|
||||
@@ -373,6 +337,24 @@
|
||||
"url": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/.js/plugins/english/WebNovelLover[madara].js",
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/multisrc/madara/icons/webnovellover.png"
|
||||
},
|
||||
{
|
||||
"id": "wuxiacity",
|
||||
"name": "Wuxiacity[readwn]",
|
||||
"site": "https://www.wuxiacity.com",
|
||||
"lang": "English",
|
||||
"version": "1.0.0",
|
||||
"url": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/.js/plugins/english/Wuxiacity[readwn].js",
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/multisrc/readwn/icons/wuxiacity.png"
|
||||
},
|
||||
{
|
||||
"id": "wuxiap",
|
||||
"name": "Wuxiap[readwn]",
|
||||
"site": "https://www.wuxiap.com",
|
||||
"lang": "English",
|
||||
"version": "1.0.0",
|
||||
"url": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/.js/plugins/english/Wuxiap[readwn].js",
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/multisrc/readwn/icons/wuxiap.png"
|
||||
},
|
||||
{
|
||||
"id": "wuxiaworld.site",
|
||||
"name": "WuxiaWorld.Site[madara]",
|
||||
@@ -470,6 +452,116 @@
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/multisrc/wpmangastream/icons/lightnovelbrasil.png"
|
||||
}
|
||||
],
|
||||
"русский язык": [
|
||||
{
|
||||
"id": "AT",
|
||||
"name": "Автор Тудей",
|
||||
"site": "https://author.today",
|
||||
"lang": "русский язык",
|
||||
"version": "1.0.0",
|
||||
"url": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/.js/plugins/russian/authortoday.js",
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/src/ru/authortoday/icon.png"
|
||||
},
|
||||
{
|
||||
"id": "bookriver",
|
||||
"name": "Bookriver",
|
||||
"site": "https://bookriver.ru",
|
||||
"lang": "русский язык",
|
||||
"version": "1.0.0",
|
||||
"url": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/.js/plugins/russian/bookriver.js",
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/src/ru/bookriver/icon.png"
|
||||
},
|
||||
{
|
||||
"id": "erolate",
|
||||
"name": "Erolate[rulate]",
|
||||
"site": "https://erolate.com",
|
||||
"lang": "русский язык",
|
||||
"version": "1.0.0",
|
||||
"url": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/.js/plugins/russian/Erolate[rulate].js",
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/multisrc/rulate/icons/erolate.png"
|
||||
},
|
||||
{
|
||||
"id": "ficbook",
|
||||
"name": "ficbook",
|
||||
"site": "https://ficbook.net",
|
||||
"lang": "русский язык",
|
||||
"version": "1.0.0",
|
||||
"url": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/.js/plugins/russian/ficbook.js",
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/src/ru/ficbook/icon.png"
|
||||
},
|
||||
{
|
||||
"id": "freedlit.space",
|
||||
"name": "LitSpace",
|
||||
"site": "https://freedlit.space",
|
||||
"lang": "русский язык",
|
||||
"version": "1.0.0",
|
||||
"url": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/.js/plugins/russian/LitSpace.js",
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/src/ru/freedlit/icon.png"
|
||||
},
|
||||
{
|
||||
"id": "jaomix.ru",
|
||||
"name": "Jaomix",
|
||||
"site": "https://jaomix.ru",
|
||||
"lang": "русский язык",
|
||||
"version": "1.0.0",
|
||||
"url": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/.js/plugins/russian/jaomix.js",
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/src/ru/jaomix/icon.png"
|
||||
},
|
||||
{
|
||||
"id": "ReN",
|
||||
"name": "Renovels",
|
||||
"site": "https://renovels.org",
|
||||
"lang": "русский язык",
|
||||
"version": "1.0.0",
|
||||
"url": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/.js/plugins/russian/renovels.js",
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/src/ru/renovels/icon.png"
|
||||
},
|
||||
{
|
||||
"id": "RLIB",
|
||||
"name": "RanobeLib",
|
||||
"site": "https://ranobelib.me",
|
||||
"lang": "русский язык",
|
||||
"version": "1.0.0",
|
||||
"url": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/.js/plugins/russian/ranobelib.js",
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/src/ru/ranobelib/icon.png"
|
||||
},
|
||||
{
|
||||
"id": "RNBH.org",
|
||||
"name": "RanobeHub",
|
||||
"site": "https://ranobehub.org/",
|
||||
"lang": "русский язык",
|
||||
"version": "1.0.0",
|
||||
"url": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/.js/plugins/russian/ranobehub.js",
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/src/ru/ranobehub/icon.png"
|
||||
},
|
||||
{
|
||||
"id": "RNRF",
|
||||
"name": "РанобэРФ",
|
||||
"site": "https://ранобэ.рф",
|
||||
"lang": "русский язык",
|
||||
"version": "1.0.0",
|
||||
"url": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/.js/plugins/russian/ranoberf.js",
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/src/ru/ranoberf/icon.png"
|
||||
},
|
||||
{
|
||||
"id": "TL",
|
||||
"name": "NovelTL",
|
||||
"site": "https://novel.tl",
|
||||
"lang": "русский язык",
|
||||
"version": "1.0.0",
|
||||
"url": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/.js/plugins/russian/novelTL.js",
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/src/ru/noveltl/icon.png"
|
||||
},
|
||||
{
|
||||
"id": "tl.rulate",
|
||||
"name": "Rulate[rulate]",
|
||||
"site": "https://tl.rulate.ru",
|
||||
"lang": "русский язык",
|
||||
"version": "1.0.0",
|
||||
"url": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/.js/plugins/russian/Rulate[rulate].js",
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/multisrc/rulate/icons/rulate.png"
|
||||
}
|
||||
],
|
||||
"español, castellano": [
|
||||
{
|
||||
"id": "tunovelaligera",
|
||||
@@ -510,6 +602,17 @@
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/multisrc/madara/icons/webnoveloku.png"
|
||||
}
|
||||
],
|
||||
"Україна": [
|
||||
{
|
||||
"id": "smakolykytl",
|
||||
"name": "Смаколики",
|
||||
"site": "https://smakolykytl.site/",
|
||||
"lang": "Україна",
|
||||
"version": "1.0.0",
|
||||
"url": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/.js/plugins/ukraine/smakolykytl.js",
|
||||
"iconUrl": "https://raw.githubusercontent.com/LNReader/lnreader-sources/plugins/icons/src/ua/smakolykytl/icon.png"
|
||||
}
|
||||
],
|
||||
"Tiếng Việt": [
|
||||
{
|
||||
"id": "ln.hako",
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "arnovel", "sourceSite": "https://arnovel.me/", "sourceName": "ArNovel", "filters": [{ "key": "sort", "label": "الترتيب حسب", "values": [{ "label": "A-Z", "value": "alphabet" }, { "label": "الآخير", "value": "latest" }, { "label": "الأكثر مشاهدة", "value": "views" }, { "label": "التقييم", "value": "rating" }, { "label": "جديد", "value": "new-manga" }, { "label": "شائع", "value": "trending" }], "inputType": "Picker" }, { "key": "genres", "label": "التصنيفات", "values": [{ "label": "أكشن", "value": "%d8%a3%d9%83%d8%b4%d9%86" }, { "label": "إتشي", "value": "%d8%a5%d8%aa%d8%b4%d9%80%d9%8a" }, { "label": "بالغ", "value": "%d8%a8%d8%a7%d9%84%d8%ba" }, { "label": "تاريخي", "value": "%d8%aa%d8%a7%d8%b1%d9%8a%d8%ae%d9%8a" }, { "label": "تراجدي", "value": "%d8%aa%d8%b1%d8%a7%d8%ac%d8%af%d9%8a" }, { "label": "جوسي", "value": "%d8%ac%d9%88%d8%b3%d9%8a" }, { "label": "حريم", "value": "%d8%ad%d8%b1%d9%8a%d9%85" }, { "label": "حياة مدرسية", "value": "%d8%ad%d9%8a%d8%a7%d8%a9-%d9%85%d8%af%d8%b1%d8%b3%d9%8a%d8%a9" }, { "label": "خارق لطبيعية", "value": "%d8%ae%d8%a7%d8%b1%d9%82-%d9%84%d8%b7%d8%a8%d9%8a%d8%b9%d9%8a%d8%a9" }, { "label": "خيال", "value": "%d8%ae%d9%8a%d8%a7%d9%84" }, { "label": "خيال علمي", "value": "%d8%ae%d9%8a%d8%a7%d9%84-%d8%b9%d9%84%d9%85%d9%8a" }, { "label": "دراما", "value": "%d8%af%d8%b1%d8%a7%d9%85%d8%a7" }, { "label": "راشد", "value": "%d8%b1%d8%a7%d8%b4%d8%af" }, { "label": "رعب", "value": "%d8%b1%d8%b9%d8%a8" }, { "label": "رومنسي", "value": "%d8%b1%d9%88%d9%85%d9%86%d8%b3%d9%8a" }, { "label": "رياضي", "value": "%d8%b1%d9%8a%d8%a7%d8%b6%d9%8a" }, { "label": "سينين", "value": "%d8%b3%d9%8a%d9%86%d9%8a%d9%86" }, { "label": "شريحة من الحياة", "value": "%d8%b4%d8%b1%d9%8a%d8%ad%d8%a9-%d9%85%d9%86-%d8%a7%d9%84%d8%ad%d9%8a%d8%a7%d8%a9" }, { "label": "شوجو", "value": "%d8%b4%d9%88%d8%ac%d9%88" }, { "label": "شونين", "value": "%d8%b4%d9%88%d9%86%d9%8a%d9%86" }, { "label": "غموض", "value": "%d8%ba%d9%85%d9%88%d8%b6" }, { "label": "فنون قتال", "value": "%d9%81%d9%86%d9%88%d9%86-%d9%82%d8%aa%d8%a7%d9%84" }, { "label": "كوميديا", "value": "%d9%83%d9%88%d9%85%d9%8a%d8%af%d9%8a%d8%a7" }, { "label": "مغامرات", "value": "%d9%85%d8%ba%d8%a7%d9%85%d8%b1%d8%a7%d8%aa" }, { "label": "منتهية", "value": "%d9%85%d9%86%d8%aa%d9%87%d9%8a%d8%a9" }, { "label": "ميكا", "value": "%d9%85%d9%8a%d9%83%d8%a7" }, { "label": "نفسي", "value": "%d9%86%d9%81%d8%b3%d9%8a" }], "inputType": "Picker" }], "options": { "path": { "genres": "home/novel-genre" }, "useNewChapterEndpoint": true, "lang": "Arabic" } });
|
||||
var plugin = new MadaraPlugin({ "id": "arnovel", "sourceSite": "https://arnovel.me/", "sourceName": "ArNovel", "filters": [{ "key": "sort", "label": "الترتيب حسب", "values": [{ "label": "A-Z", "value": "alphabet" }, { "label": "الآخير", "value": "latest" }, { "label": "الأكثر مشاهدة", "value": "views" }, { "label": "التقييم", "value": "rating" }, { "label": "جديد", "value": "new-manga" }, { "label": "شائع", "value": "trending" }], "inputType": 1 }, { "key": "genres", "label": "التصنيفات", "values": [{ "label": "أكشن", "value": "%d8%a3%d9%83%d8%b4%d9%86" }, { "label": "إتشي", "value": "%d8%a5%d8%aa%d8%b4%d9%80%d9%8a" }, { "label": "بالغ", "value": "%d8%a8%d8%a7%d9%84%d8%ba" }, { "label": "تاريخي", "value": "%d8%aa%d8%a7%d8%b1%d9%8a%d8%ae%d9%8a" }, { "label": "تراجدي", "value": "%d8%aa%d8%b1%d8%a7%d8%ac%d8%af%d9%8a" }, { "label": "جوسي", "value": "%d8%ac%d9%88%d8%b3%d9%8a" }, { "label": "حريم", "value": "%d8%ad%d8%b1%d9%8a%d9%85" }, { "label": "حياة مدرسية", "value": "%d8%ad%d9%8a%d8%a7%d8%a9-%d9%85%d8%af%d8%b1%d8%b3%d9%8a%d8%a9" }, { "label": "خارق لطبيعية", "value": "%d8%ae%d8%a7%d8%b1%d9%82-%d9%84%d8%b7%d8%a8%d9%8a%d8%b9%d9%8a%d8%a9" }, { "label": "خيال", "value": "%d8%ae%d9%8a%d8%a7%d9%84" }, { "label": "خيال علمي", "value": "%d8%ae%d9%8a%d8%a7%d9%84-%d8%b9%d9%84%d9%85%d9%8a" }, { "label": "دراما", "value": "%d8%af%d8%b1%d8%a7%d9%85%d8%a7" }, { "label": "راشد", "value": "%d8%b1%d8%a7%d8%b4%d8%af" }, { "label": "رعب", "value": "%d8%b1%d8%b9%d8%a8" }, { "label": "رومنسي", "value": "%d8%b1%d9%88%d9%85%d9%86%d8%b3%d9%8a" }, { "label": "رياضي", "value": "%d8%b1%d9%8a%d8%a7%d8%b6%d9%8a" }, { "label": "سينين", "value": "%d8%b3%d9%8a%d9%86%d9%8a%d9%86" }, { "label": "شريحة من الحياة", "value": "%d8%b4%d8%b1%d9%8a%d8%ad%d8%a9-%d9%85%d9%86-%d8%a7%d9%84%d8%ad%d9%8a%d8%a7%d8%a9" }, { "label": "شوجو", "value": "%d8%b4%d9%88%d8%ac%d9%88" }, { "label": "شونين", "value": "%d8%b4%d9%88%d9%86%d9%8a%d9%86" }, { "label": "غموض", "value": "%d8%ba%d9%85%d9%88%d8%b6" }, { "label": "فنون قتال", "value": "%d9%81%d9%86%d9%88%d9%86-%d9%82%d8%aa%d8%a7%d9%84" }, { "label": "كوميديا", "value": "%d9%83%d9%88%d9%85%d9%8a%d8%af%d9%8a%d8%a7" }, { "label": "مغامرات", "value": "%d9%85%d8%ba%d8%a7%d9%85%d8%b1%d8%a7%d8%aa" }, { "label": "منتهية", "value": "%d9%85%d9%86%d8%aa%d9%87%d9%8a%d8%a9" }, { "label": "ميكا", "value": "%d9%85%d9%8a%d9%83%d8%a7" }, { "label": "نفسي", "value": "%d9%86%d9%81%d8%b3%d9%8a" }], "inputType": 1 }], "options": { "path": { "genres": "home/novel-genre" }, "useNewChapterEndpoint": true, "lang": "Arabic" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "hizomanga", "sourceSite": "https://hizomanga.com/", "sourceName": "HizoManga", "filters": [{ "key": "sort", "label": "ترتيب حسب", "values": [{ "label": "A-Z", "value": "alphabet" }, { "label": "New", "value": "new-manga" }, { "label": "الأحدث", "value": "latest" }, { "label": "الأكثر مشاهدة", "value": "views" }, { "label": "التقييم", "value": "rating" }, { "label": "الرائج", "value": "trending" }], "inputType": "Picker" }, { "key": "genres", "label": "التصنيفات", "values": [{ "label": "آلات", "value": "mechanisms" }, { "label": "أكشن", "value": "action" }, { "label": "إثارة", "value": "excitement" }, { "label": "إيسكاي", "value": "%d8%a5%d9%8a%d8%b3%d9%83%d8%a7%d9%8a" }, { "label": "الحياة اليومية", "value": "slice-of-life" }, { "label": "الحياة مدرسية", "value": "school-life" }, { "label": "تاريخي", "value": "historical" }, { "label": "تراجيدي", "value": "tragic" }, { "label": "جريمة", "value": "%d8%ac%d8%b1%d9%8a%d9%85%d8%a9" }, { "label": "جندر بندر", "value": "%d8%ac%d9%86%d8%af%d8%b1-%d8%a8%d9%86%d8%af%d8%b1" }, { "label": "جوسي", "value": "josei" }, { "label": "حريم", "value": "harem" }, { "label": "خارق للطبيعة", "value": "supernatural" }, { "label": "خيال", "value": "fantasy" }, { "label": "خيال علمي", "value": "sci-fi" }, { "label": "دراما", "value": "drama" }, { "label": "دموي", "value": "%d8%af%d9%85%d9%88%d9%8a" }, { "label": "راشد", "value": "mature" }, { "label": "رعب", "value": "horror" }, { "label": "رومانسي", "value": "romance" }, { "label": "رياضة", "value": "sports" }, { "label": "زمنكاني", "value": "my-time" }, { "label": "زومبي", "value": "%d8%b2%d9%88%d9%85%d8%a8%d9%8a" }, { "label": "سينين", "value": "seinen" }, { "label": "شريحة من الحياة", "value": "%d8%b4%d8%b1%d9%8a%d8%ad%d8%a9-%d9%85%d9%86-%d8%a7%d9%84%d8%ad%d9%8a%d8%a7%d8%a9" }, { "label": "شوجو", "value": "shoujo" }, { "label": "شونين", "value": "shounen" }, { "label": "طبي", "value": "%d8%b7%d8%a8%d9%8a" }, { "label": "غموض", "value": "ambiguity" }, { "label": "فنون قتالية", "value": "martial-arts" }, { "label": "قوة خارقة", "value": "superpower" }, { "label": "كوميدي", "value": "comedy" }, { "label": "مغامرات", "value": "adventure" }, { "label": "نفسي", "value": "psychological" }], "inputType": "Picker" }], "options": { "path": { "novels": "serie", "novel": "serie", "chapter": "serie", "genres": "manga-genre" }, "useNewChapterEndpoint": true, "lang": "Arabic" } });
|
||||
var plugin = new MadaraPlugin({ "id": "hizomanga", "sourceSite": "https://hizomanga.com/", "sourceName": "HizoManga", "filters": [{ "key": "sort", "label": "ترتيب حسب", "values": [{ "label": "A-Z", "value": "alphabet" }, { "label": "New", "value": "new-manga" }, { "label": "الأحدث", "value": "latest" }, { "label": "الأكثر مشاهدة", "value": "views" }, { "label": "التقييم", "value": "rating" }, { "label": "الرائج", "value": "trending" }], "inputType": 1 }, { "key": "genres", "label": "التصنيفات", "values": [{ "label": "آلات", "value": "mechanisms" }, { "label": "أكشن", "value": "action" }, { "label": "إثارة", "value": "excitement" }, { "label": "إيسكاي", "value": "%d8%a5%d9%8a%d8%b3%d9%83%d8%a7%d9%8a" }, { "label": "الحياة اليومية", "value": "slice-of-life" }, { "label": "الحياة مدرسية", "value": "school-life" }, { "label": "تاريخي", "value": "historical" }, { "label": "تراجيدي", "value": "tragic" }, { "label": "جريمة", "value": "%d8%ac%d8%b1%d9%8a%d9%85%d8%a9" }, { "label": "جندر بندر", "value": "%d8%ac%d9%86%d8%af%d8%b1-%d8%a8%d9%86%d8%af%d8%b1" }, { "label": "جوسي", "value": "josei" }, { "label": "حريم", "value": "harem" }, { "label": "خارق للطبيعة", "value": "supernatural" }, { "label": "خيال", "value": "fantasy" }, { "label": "خيال علمي", "value": "sci-fi" }, { "label": "دراما", "value": "drama" }, { "label": "دموي", "value": "%d8%af%d9%85%d9%88%d9%8a" }, { "label": "راشد", "value": "mature" }, { "label": "رعب", "value": "horror" }, { "label": "رومانسي", "value": "romance" }, { "label": "رياضة", "value": "sports" }, { "label": "زمنكاني", "value": "my-time" }, { "label": "زومبي", "value": "%d8%b2%d9%88%d9%85%d8%a8%d9%8a" }, { "label": "سينين", "value": "seinen" }, { "label": "شريحة من الحياة", "value": "%d8%b4%d8%b1%d9%8a%d8%ad%d8%a9-%d9%85%d9%86-%d8%a7%d9%84%d8%ad%d9%8a%d8%a7%d8%a9" }, { "label": "شوجو", "value": "shoujo" }, { "label": "شونين", "value": "shounen" }, { "label": "طبي", "value": "%d8%b7%d8%a8%d9%8a" }, { "label": "غموض", "value": "ambiguity" }, { "label": "فنون قتالية", "value": "martial-arts" }, { "label": "قوة خارقة", "value": "superpower" }, { "label": "كوميدي", "value": "comedy" }, { "label": "مغامرات", "value": "adventure" }, { "label": "نفسي", "value": "psychological" }], "inputType": 1 }], "options": { "path": { "novels": "serie", "novel": "serie", "chapter": "serie", "genres": "manga-genre" }, "useNewChapterEndpoint": true, "lang": "Arabic" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "novel4up", "sourceSite": "https://novel4up.com/", "sourceName": "Novel4Up", "filters": [{ "key": "sort", "label": "ترتيب حسب:", "values": [{ "label": "أ-ي", "value": "alphabet" }, { "label": "الأحدث", "value": "latest" }, { "label": "الأكثر مشاهدة", "value": "views" }, { "label": "التقييم", "value": "rating" }, { "label": "الجديد", "value": "new-manga" }, { "label": "الشائع", "value": "trending" }], "inputType": "Picker" }, { "key": "genres", "label": "التصنيفات", "values": [{ "label": "أكشن", "value": "action" }, { "label": "الخارق للطبيعة", "value": "supernatural" }, { "label": "تاريخي", "value": "historical" }, { "label": "تحقيق", "value": "detective" }, { "label": "تراجيديا", "value": "tragedy" }, { "label": "حريم", "value": "harem" }, { "label": "حياة مدرسية", "value": "school-life" }, { "label": "خيال علمي", "value": "sci-fi" }, { "label": "دراما", "value": "drama" }, { "label": "رعب", "value": "horror" }, { "label": "رومانسي", "value": "romance" }, { "label": "رياضة", "value": "sports" }, { "label": "سحر", "value": "magic" }, { "label": "شريحة من الحياة", "value": "slice-of-life" }, { "label": "شوانهوا", "value": "xuanhuan" }, { "label": "شوجو", "value": "shoujo" }, { "label": "شونين", "value": "shounen" }, { "label": "غموض", "value": "mystery" }, { "label": "فانتازيا", "value": "fantasy" }, { "label": "فنون قتال", "value": "martial-arts" }, { "label": "كوميديا", "value": "comedy" }, { "label": "مغامرة", "value": "adventure" }, { "label": "ميكا", "value": "mecha" }, { "label": "نفسي", "value": "psychological" }, { "label": "ون شوت", "value": "one-shot" }, { "label": "ووشيا", "value": "wuxia" }], "inputType": "Picker" }], "options": { "lang": "Arabic" } });
|
||||
var plugin = new MadaraPlugin({ "id": "novel4up", "sourceSite": "https://novel4up.com/", "sourceName": "Novel4Up", "filters": [{ "key": "sort", "label": "ترتيب حسب:", "values": [{ "label": "أ-ي", "value": "alphabet" }, { "label": "الأحدث", "value": "latest" }, { "label": "الأكثر مشاهدة", "value": "views" }, { "label": "التقييم", "value": "rating" }, { "label": "الجديد", "value": "new-manga" }, { "label": "الشائع", "value": "trending" }], "inputType": 1 }, { "key": "genres", "label": "التصنيفات", "values": [{ "label": "أكشن", "value": "action" }, { "label": "الخارق للطبيعة", "value": "supernatural" }, { "label": "تاريخي", "value": "historical" }, { "label": "تحقيق", "value": "detective" }, { "label": "تراجيديا", "value": "tragedy" }, { "label": "حريم", "value": "harem" }, { "label": "حياة مدرسية", "value": "school-life" }, { "label": "خيال علمي", "value": "sci-fi" }, { "label": "دراما", "value": "drama" }, { "label": "رعب", "value": "horror" }, { "label": "رومانسي", "value": "romance" }, { "label": "رياضة", "value": "sports" }, { "label": "سحر", "value": "magic" }, { "label": "شريحة من الحياة", "value": "slice-of-life" }, { "label": "شوانهوا", "value": "xuanhuan" }, { "label": "شوجو", "value": "shoujo" }, { "label": "شونين", "value": "shounen" }, { "label": "غموض", "value": "mystery" }, { "label": "فانتازيا", "value": "fantasy" }, { "label": "فنون قتال", "value": "martial-arts" }, { "label": "كوميديا", "value": "comedy" }, { "label": "مغامرة", "value": "adventure" }, { "label": "ميكا", "value": "mecha" }, { "label": "نفسي", "value": "psychological" }, { "label": "ون شوت", "value": "one-shot" }, { "label": "ووشيا", "value": "wuxia" }], "inputType": 1 }], "options": { "lang": "Arabic" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "riwyat", "sourceSite": "https://riwyat.com/", "sourceName": "Riwyat", "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": "Picker" }, { "key": "genres", "label": "GENRES", "values": [{ "label": "أكشن", "value": "%d8%a3%d9%83%d8%b4%d9%86" }, { "label": "أيتشي", "value": "%d8%a3%d9%8a%d8%aa%d8%b4%d9%8a" }, { "label": "استراتجي", "value": "%d8%a7%d8%b3%d8%aa%d8%b1%d8%a7%d8%aa%d8%ac%d9%8a" }, { "label": "العصر الحديث", "value": "%d8%a7%d9%84%d8%b9%d8%b5%d8%b1-%d8%a7%d9%84%d8%ad%d8%af%d9%8a%d8%ab" }, { "label": "انتقام", "value": "%d8%a7%d9%86%d8%aa%d9%82%d8%a7%d9%85" }, { "label": "بالغ", "value": "%d8%a8%d8%a7%d9%84%d8%ba" }, { "label": "بناء مملكة", "value": "%d8%a8%d9%86%d8%a7%d8%a1-%d9%85%d9%85%d9%84%d9%83%d8%a9" }, { "label": "بوليسي", "value": "%d8%a8%d9%88%d9%84%d9%8a%d8%b3%d9%8a" }, { "label": "تاريخي", "value": "%d8%aa%d8%a7%d8%b1%d9%8a%d8%ae%d9%8a" }, { "label": "جوسي", "value": "%d8%ac%d9%88%d8%b3%d9%8a" }, { "label": "حريم", "value": "%d8%ad%d8%b1%d9%8a%d9%85" }, { "label": "حياة يومية", "value": "%d8%ad%d9%8a%d8%a7%d8%a9-%d9%8a%d9%88%d9%85%d9%8a%d8%a9" }, { "label": "خيال", "value": "%d8%ae%d9%8a%d8%a7%d9%84" }, { "label": "خيال علمي", "value": "%d8%ae%d9%8a%d8%a7%d9%84-%d8%b9%d9%84%d9%85%d9%8a" }, { "label": "دراما", "value": "%d8%af%d8%b1%d8%a7%d9%85%d8%a7" }, { "label": "رعب", "value": "%d8%b1%d8%b9%d8%a8" }, { "label": "رومانسية", "value": "%d8%b1%d9%88%d9%85%d8%a7%d9%86%d8%b3%d9%8a%d8%a9" }, { "label": "رياضي", "value": "%d8%b1%d9%8a%d8%a7%d8%b6%d9%8a" }, { "label": "زيانشيا", "value": "xianxia" }, { "label": "سنين", "value": "%d8%b3%d9%86%d9%8a%d9%86" }, { "label": "شريحة حياة", "value": "%d8%b4%d8%b1%d9%8a%d8%ad%d8%a9-%d8%ad%d9%8a%d8%a7%d8%a9" }, { "label": "شوانهوان", "value": "xuanhuan" }, { "label": "شوجو", "value": "%d8%b4%d9%88%d8%ac%d9%88" }, { "label": "شونين", "value": "%d8%b4%d9%88%d9%86%d9%8a%d9%86" }, { "label": "شيانشيا", "value": "%d8%b4%d9%8a%d8%a7%d9%86%d8%b4%d9%8a%d8%a7" }, { "label": "عسكري", "value": "%d8%b9%d8%b3%d9%83%d8%b1%d9%8a" }, { "label": "غموض", "value": "%d8%ba%d9%85%d9%88%d8%b6" }, { "label": "فانتازيا", "value": "%d9%81%d8%a7%d9%86%d8%aa%d8%a7%d8%b2%d9%8a%d8%a7" }, { "label": "فنون قتالية", "value": "%d9%81%d9%86%d9%88%d9%86-%d9%82%d8%aa%d8%a7%d9%84%d9%8a%d8%a9" }, { "label": "قوى خارقة", "value": "%d9%82%d9%88%d9%89-%d8%ae%d8%a7%d8%b1%d9%82%d8%a9" }, { "label": "كوميديا", "value": "%d9%83%d9%88%d9%85%d9%8a%d8%af%d9%8a%d8%a7" }, { "label": "كوميك", "value": "%d9%83%d9%88%d9%85%d9%8a%d9%83" }, { "label": "للكبار", "value": "%d9%84%d9%84%d9%83%d8%a8%d8%a7%d8%b1" }, { "label": "مأساة", "value": "%d9%85%d8%a3%d8%b3%d8%a7%d8%a9" }, { "label": "مانجا", "value": "%d9%85%d8%a7%d9%86%d8%ac%d8%a7" }, { "label": "مانها", "value": "%d9%85%d8%a7%d9%86%d9%87%d8%a7" }, { "label": "مانهوا", "value": "%d9%85%d8%a7%d9%86%d9%87%d9%88%d8%a7" }, { "label": "مدرسي", "value": "%d9%85%d8%af%d8%b1%d8%b3%d9%8a" }, { "label": "مصاصي دماء", "value": "%d9%85%d8%b5%d8%a7%d8%b5%d9%8a-%d8%af%d9%85%d8%a7%d8%a1" }, { "label": "مغامرة", "value": "%d9%85%d8%ba%d8%a7%d9%85%d8%b1%d8%a9" }, { "label": "مكتملة", "value": "%d9%85%d9%83%d8%aa%d9%85%d9%84%d8%a9" }, { "label": "نفسي", "value": "%d9%86%d9%81%d8%b3%d9%8a" }, { "label": "نهاية العالم", "value": "%d9%86%d9%87%d8%a7%d9%8a%d8%a9-%d8%a7%d9%84%d8%b9%d8%a7%d9%84%d9%85" }, { "label": "واب تون", "value": "%d9%88%d8%a7%d8%a8-%d8%aa%d9%88%d9%86" }, { "label": "وان شوت", "value": "%d9%88%d8%a7%d9%86-%d8%b4%d9%88%d8%aa" }], "inputType": "Picker" }], "options": { "useNewChapterEndpoint": true, "lang": "Arabic" } });
|
||||
var plugin = new MadaraPlugin({ "id": "riwyat", "sourceSite": "https://riwyat.com/", "sourceName": "Riwyat", "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": 1 }, { "key": "genres", "label": "GENRES", "values": [{ "label": "أكشن", "value": "%d8%a3%d9%83%d8%b4%d9%86" }, { "label": "أيتشي", "value": "%d8%a3%d9%8a%d8%aa%d8%b4%d9%8a" }, { "label": "استراتجي", "value": "%d8%a7%d8%b3%d8%aa%d8%b1%d8%a7%d8%aa%d8%ac%d9%8a" }, { "label": "العصر الحديث", "value": "%d8%a7%d9%84%d8%b9%d8%b5%d8%b1-%d8%a7%d9%84%d8%ad%d8%af%d9%8a%d8%ab" }, { "label": "انتقام", "value": "%d8%a7%d9%86%d8%aa%d9%82%d8%a7%d9%85" }, { "label": "بالغ", "value": "%d8%a8%d8%a7%d9%84%d8%ba" }, { "label": "بناء مملكة", "value": "%d8%a8%d9%86%d8%a7%d8%a1-%d9%85%d9%85%d9%84%d9%83%d8%a9" }, { "label": "بوليسي", "value": "%d8%a8%d9%88%d9%84%d9%8a%d8%b3%d9%8a" }, { "label": "تاريخي", "value": "%d8%aa%d8%a7%d8%b1%d9%8a%d8%ae%d9%8a" }, { "label": "جوسي", "value": "%d8%ac%d9%88%d8%b3%d9%8a" }, { "label": "حريم", "value": "%d8%ad%d8%b1%d9%8a%d9%85" }, { "label": "حياة يومية", "value": "%d8%ad%d9%8a%d8%a7%d8%a9-%d9%8a%d9%88%d9%85%d9%8a%d8%a9" }, { "label": "خيال", "value": "%d8%ae%d9%8a%d8%a7%d9%84" }, { "label": "خيال علمي", "value": "%d8%ae%d9%8a%d8%a7%d9%84-%d8%b9%d9%84%d9%85%d9%8a" }, { "label": "دراما", "value": "%d8%af%d8%b1%d8%a7%d9%85%d8%a7" }, { "label": "رعب", "value": "%d8%b1%d8%b9%d8%a8" }, { "label": "رومانسية", "value": "%d8%b1%d9%88%d9%85%d8%a7%d9%86%d8%b3%d9%8a%d8%a9" }, { "label": "رياضي", "value": "%d8%b1%d9%8a%d8%a7%d8%b6%d9%8a" }, { "label": "زيانشيا", "value": "xianxia" }, { "label": "سنين", "value": "%d8%b3%d9%86%d9%8a%d9%86" }, { "label": "شريحة حياة", "value": "%d8%b4%d8%b1%d9%8a%d8%ad%d8%a9-%d8%ad%d9%8a%d8%a7%d8%a9" }, { "label": "شوانهوان", "value": "xuanhuan" }, { "label": "شوجو", "value": "%d8%b4%d9%88%d8%ac%d9%88" }, { "label": "شونين", "value": "%d8%b4%d9%88%d9%86%d9%8a%d9%86" }, { "label": "شيانشيا", "value": "%d8%b4%d9%8a%d8%a7%d9%86%d8%b4%d9%8a%d8%a7" }, { "label": "عسكري", "value": "%d8%b9%d8%b3%d9%83%d8%b1%d9%8a" }, { "label": "غموض", "value": "%d8%ba%d9%85%d9%88%d8%b6" }, { "label": "فانتازيا", "value": "%d9%81%d8%a7%d9%86%d8%aa%d8%a7%d8%b2%d9%8a%d8%a7" }, { "label": "فنون قتالية", "value": "%d9%81%d9%86%d9%88%d9%86-%d9%82%d8%aa%d8%a7%d9%84%d9%8a%d8%a9" }, { "label": "قوى خارقة", "value": "%d9%82%d9%88%d9%89-%d8%ae%d8%a7%d8%b1%d9%82%d8%a9" }, { "label": "كوميديا", "value": "%d9%83%d9%88%d9%85%d9%8a%d8%af%d9%8a%d8%a7" }, { "label": "كوميك", "value": "%d9%83%d9%88%d9%85%d9%8a%d9%83" }, { "label": "للكبار", "value": "%d9%84%d9%84%d9%83%d8%a8%d8%a7%d8%b1" }, { "label": "مأساة", "value": "%d9%85%d8%a3%d8%b3%d8%a7%d8%a9" }, { "label": "مانجا", "value": "%d9%85%d8%a7%d9%86%d8%ac%d8%a7" }, { "label": "مانها", "value": "%d9%85%d8%a7%d9%86%d9%87%d8%a7" }, { "label": "مانهوا", "value": "%d9%85%d8%a7%d9%86%d9%87%d9%88%d8%a7" }, { "label": "مدرسي", "value": "%d9%85%d8%af%d8%b1%d8%b3%d9%8a" }, { "label": "مصاصي دماء", "value": "%d9%85%d8%b5%d8%a7%d8%b5%d9%8a-%d8%af%d9%85%d8%a7%d8%a1" }, { "label": "مغامرة", "value": "%d9%85%d8%ba%d8%a7%d9%85%d8%b1%d8%a9" }, { "label": "مكتملة", "value": "%d9%85%d9%83%d8%aa%d9%85%d9%84%d8%a9" }, { "label": "نفسي", "value": "%d9%86%d9%81%d8%b3%d9%8a" }, { "label": "نهاية العالم", "value": "%d9%86%d9%87%d8%a7%d9%8a%d8%a9-%d8%a7%d9%84%d8%b9%d8%a7%d9%84%d9%85" }, { "label": "واب تون", "value": "%d9%88%d8%a7%d8%a8-%d8%aa%d9%88%d9%86" }, { "label": "وان شوت", "value": "%d9%88%d8%a7%d9%86-%d8%b4%d9%88%d8%aa" }], "inputType": 1 }], "options": { "useNewChapterEndpoint": true, "lang": "Arabic" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "boxnovel", "sourceSite": "https://boxnovel.com/", "sourceName": "BoxNovel", "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": "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": "Picker" }], "options": { "path": { "genres": "manga-genre" }, "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
var plugin = new MadaraPlugin({ "id": "boxnovel", "sourceSite": "https://boxnovel.com/", "sourceName": "BoxNovel", "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": 1 }, { "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": 1 }], "options": { "path": { "genres": "manga-genre" }, "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -1,269 +0,0 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var fetch_1 = require("@libs/fetch");
|
||||
var cheerio_1 = require("cheerio");
|
||||
var defaultCover_1 = require("@libs/defaultCover");
|
||||
var novelStatus_1 = require("@libs/novelStatus");
|
||||
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
|
||||
var dayjs_1 = __importDefault(require("dayjs"));
|
||||
var MadaraDefaultPath = {
|
||||
novels: 'novel',
|
||||
novel: 'novel',
|
||||
chapter: 'novel'
|
||||
};
|
||||
var MadaraPlugin = /** @class */ (function () {
|
||||
function MadaraPlugin(metadata) {
|
||||
this.id = metadata.id;
|
||||
this.name = metadata.sourceName + "[madara]";
|
||||
var iconFileName = metadata.sourceName.replace(/\s+/g, "").toLowerCase();
|
||||
this.icon = "multisrc/madara/icons/".concat(iconFileName, ".png");
|
||||
this.site = metadata.sourceSite;
|
||||
this.version = "1.0.0";
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
var filters = _a.filters, showLatestNovels = _a.showLatestNovels;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var novels, url, body, loadedCheerio;
|
||||
return __generator(this, function (_h) {
|
||||
switch (_h.label) {
|
||||
case 0:
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
url += '/page/' + pageNo + '/' +
|
||||
'?m_orderby=' + (showLatestNovels ? 'latest' : ((filters === null || filters === void 0 ? void 0 : filters.sort) || 'rating'));
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
|
||||
case 1:
|
||||
body = _h.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
loadedCheerio('.manga-title-badges').remove();
|
||||
loadedCheerio('.page-item-detail').each(function () {
|
||||
var novelName = loadedCheerio(this).find('.post-title').text().trim();
|
||||
var image = loadedCheerio(this).find('img');
|
||||
var novelCover = image.attr('data-src') || image.attr('src');
|
||||
var novelUrl = loadedCheerio(this).find('.post-title')
|
||||
.find('a')
|
||||
.attr('href') || '';
|
||||
var novel = {
|
||||
name: novelName,
|
||||
cover: novelCover,
|
||||
url: novelUrl,
|
||||
};
|
||||
novels.push(novel);
|
||||
});
|
||||
return [2 /*return*/, novels];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
MadaraPlugin.prototype.parseNovelAndChapters = function (novelUrl) {
|
||||
var _a;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var novel, body, loadedCheerio, html, novelId, formData, chapters;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
novel = {
|
||||
url: novelUrl,
|
||||
};
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(novelUrl).then(function (res) { return res.text(); })];
|
||||
case 1:
|
||||
body = _b.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
loadedCheerio('.manga-title-badges, #manga-title span').remove();
|
||||
novel.name =
|
||||
loadedCheerio('.post-title h1').text().trim() ||
|
||||
loadedCheerio('#manga-title h1').text();
|
||||
novel.cover =
|
||||
loadedCheerio('.summary_image > a > img').attr('data-lazy-src') ||
|
||||
loadedCheerio('.summary_image > a > img').attr('data-src') ||
|
||||
loadedCheerio('.summary_image > a > img').attr('src') ||
|
||||
defaultCover_1.defaultCover;
|
||||
loadedCheerio('.post-content_item, .post-content').each(function () {
|
||||
var detailName = loadedCheerio(this).find('h5').text().trim();
|
||||
var detail = loadedCheerio(this).find('.summary-content').text().trim();
|
||||
switch (detailName) {
|
||||
case 'Genre(s)':
|
||||
case 'التصنيفات':
|
||||
novel.genres = detail.replace(/[\\t\\n]/g, ',');
|
||||
break;
|
||||
case 'Author(s)':
|
||||
case 'المؤلف':
|
||||
case 'المؤلف (ين)':
|
||||
novel.author = detail;
|
||||
break;
|
||||
case 'Status':
|
||||
case 'الحالة':
|
||||
novel.status =
|
||||
detail.includes('OnGoing') || detail.includes('مستمرة')
|
||||
? novelStatus_1.NovelStatus.Ongoing
|
||||
: novelStatus_1.NovelStatus.Completed;
|
||||
break;
|
||||
}
|
||||
});
|
||||
loadedCheerio('div.summary__content .code-block,script').remove();
|
||||
novel.summary =
|
||||
loadedCheerio('div.summary__content').text().trim() ||
|
||||
loadedCheerio('#tab-manga-about').text().trim() ||
|
||||
loadedCheerio('.post-content_item h5:contains("Summary")').next().text().trim();
|
||||
if (!(((_a = this.options) === null || _a === void 0 ? void 0 : _a.useNewChapterEndpoint) !== true)) return [3 /*break*/, 3];
|
||||
novelId = loadedCheerio('.rating-post-id').attr('value') ||
|
||||
loadedCheerio('#manga-chapters-holder').attr('data-id') || '';
|
||||
formData = new FormData();
|
||||
formData.append("action", "manga_get_chapters");
|
||||
formData.append("manga", novelId);
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(this.site + 'wp-admin/admin-ajax.php', {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
})
|
||||
.then(function (res) { return res.text(); })];
|
||||
case 2:
|
||||
html = _b.sent();
|
||||
return [3 /*break*/, 5];
|
||||
case 3: return [4 /*yield*/, (0, fetch_1.fetchApi)(novelUrl + 'ajax/chapters/', { method: 'POST' })
|
||||
.then(function (res) { return res.text(); })];
|
||||
case 4:
|
||||
html = _b.sent();
|
||||
_b.label = 5;
|
||||
case 5:
|
||||
if (html !== '0') {
|
||||
loadedCheerio = (0, cheerio_1.load)(html);
|
||||
}
|
||||
chapters = [];
|
||||
loadedCheerio('.wp-manga-chapter').each(function () {
|
||||
var chapterName = loadedCheerio(this).find('a').text().trim();
|
||||
var releaseDate = null;
|
||||
releaseDate = loadedCheerio(this)
|
||||
.find('span.chapter-release-date')
|
||||
.text()
|
||||
.trim();
|
||||
if (releaseDate) {
|
||||
releaseDate = (0, parseMadaraDate_1.parseMadaraDate)(releaseDate);
|
||||
}
|
||||
else {
|
||||
/**
|
||||
* Insert current date
|
||||
*/
|
||||
releaseDate = (0, dayjs_1.default)().format('LL');
|
||||
}
|
||||
var chapterUrl = loadedCheerio(this).find('a').attr('href') || '';
|
||||
chapters.push({ name: chapterName, releaseTime: releaseDate, url: chapterUrl });
|
||||
});
|
||||
novel.chapters = chapters.reverse();
|
||||
return [2 /*return*/, novel];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
MadaraPlugin.prototype.parseChapter = function (chapterUrl) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var body, loadedCheerio, chapterText;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)(chapterUrl).then(function (res) { return res.text(); })];
|
||||
case 1:
|
||||
body = _a.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
chapterText = loadedCheerio('.text-left').html() ||
|
||||
loadedCheerio('.text-right').html() ||
|
||||
loadedCheerio('.entry-content').html() || "";
|
||||
return [2 /*return*/, chapterText];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
MadaraPlugin.prototype.searchNovels = function (searchTerm, pageNo) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var novels, url, body, loadedCheerio;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
novels = [];
|
||||
url = this.site + "?s=" + searchTerm + "&post_type=wp-manga";
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
|
||||
case 1:
|
||||
body = _a.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
loadedCheerio('.c-tabs-item__content').each(function () {
|
||||
var novelName = loadedCheerio(this).find('.post-title').text().trim();
|
||||
var image = loadedCheerio(this).find('img');
|
||||
var novelCover = image.attr('data-src') || image.attr('src');
|
||||
var novelUrl = loadedCheerio(this)
|
||||
.find('.post-title')
|
||||
.find('a')
|
||||
.attr('href') || '';
|
||||
var novel = {
|
||||
name: novelName,
|
||||
cover: novelCover,
|
||||
url: novelUrl,
|
||||
};
|
||||
novels.push(novel);
|
||||
});
|
||||
return [2 /*return*/, novels];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
MadaraPlugin.prototype.fetchImage = function (url) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, (0, fetch_1.fetchFile)(url, {})];
|
||||
case 1: return [2 /*return*/, _a.sent()];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "clicknovel", "sourceSite": "https://clicknovel.net/", "sourceName": "ClickNovel", "filters": [], "options": { "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
@@ -1,269 +0,0 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var fetch_1 = require("@libs/fetch");
|
||||
var cheerio_1 = require("cheerio");
|
||||
var defaultCover_1 = require("@libs/defaultCover");
|
||||
var novelStatus_1 = require("@libs/novelStatus");
|
||||
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
|
||||
var dayjs_1 = __importDefault(require("dayjs"));
|
||||
var MadaraDefaultPath = {
|
||||
novels: 'novel',
|
||||
novel: 'novel',
|
||||
chapter: 'novel'
|
||||
};
|
||||
var MadaraPlugin = /** @class */ (function () {
|
||||
function MadaraPlugin(metadata) {
|
||||
this.id = metadata.id;
|
||||
this.name = metadata.sourceName + "[madara]";
|
||||
var iconFileName = metadata.sourceName.replace(/\s+/g, "").toLowerCase();
|
||||
this.icon = "multisrc/madara/icons/".concat(iconFileName, ".png");
|
||||
this.site = metadata.sourceSite;
|
||||
this.version = "1.0.0";
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
var filters = _a.filters, showLatestNovels = _a.showLatestNovels;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var novels, url, body, loadedCheerio;
|
||||
return __generator(this, function (_h) {
|
||||
switch (_h.label) {
|
||||
case 0:
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
url += '/page/' + pageNo + '/' +
|
||||
'?m_orderby=' + (showLatestNovels ? 'latest' : ((filters === null || filters === void 0 ? void 0 : filters.sort) || 'rating'));
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
|
||||
case 1:
|
||||
body = _h.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
loadedCheerio('.manga-title-badges').remove();
|
||||
loadedCheerio('.page-item-detail').each(function () {
|
||||
var novelName = loadedCheerio(this).find('.post-title').text().trim();
|
||||
var image = loadedCheerio(this).find('img');
|
||||
var novelCover = image.attr('data-src') || image.attr('src');
|
||||
var novelUrl = loadedCheerio(this).find('.post-title')
|
||||
.find('a')
|
||||
.attr('href') || '';
|
||||
var novel = {
|
||||
name: novelName,
|
||||
cover: novelCover,
|
||||
url: novelUrl,
|
||||
};
|
||||
novels.push(novel);
|
||||
});
|
||||
return [2 /*return*/, novels];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
MadaraPlugin.prototype.parseNovelAndChapters = function (novelUrl) {
|
||||
var _a;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var novel, body, loadedCheerio, html, novelId, formData, chapters;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
novel = {
|
||||
url: novelUrl,
|
||||
};
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(novelUrl).then(function (res) { return res.text(); })];
|
||||
case 1:
|
||||
body = _b.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
loadedCheerio('.manga-title-badges, #manga-title span').remove();
|
||||
novel.name =
|
||||
loadedCheerio('.post-title h1').text().trim() ||
|
||||
loadedCheerio('#manga-title h1').text();
|
||||
novel.cover =
|
||||
loadedCheerio('.summary_image > a > img').attr('data-lazy-src') ||
|
||||
loadedCheerio('.summary_image > a > img').attr('data-src') ||
|
||||
loadedCheerio('.summary_image > a > img').attr('src') ||
|
||||
defaultCover_1.defaultCover;
|
||||
loadedCheerio('.post-content_item, .post-content').each(function () {
|
||||
var detailName = loadedCheerio(this).find('h5').text().trim();
|
||||
var detail = loadedCheerio(this).find('.summary-content').text().trim();
|
||||
switch (detailName) {
|
||||
case 'Genre(s)':
|
||||
case 'التصنيفات':
|
||||
novel.genres = detail.replace(/[\\t\\n]/g, ',');
|
||||
break;
|
||||
case 'Author(s)':
|
||||
case 'المؤلف':
|
||||
case 'المؤلف (ين)':
|
||||
novel.author = detail;
|
||||
break;
|
||||
case 'Status':
|
||||
case 'الحالة':
|
||||
novel.status =
|
||||
detail.includes('OnGoing') || detail.includes('مستمرة')
|
||||
? novelStatus_1.NovelStatus.Ongoing
|
||||
: novelStatus_1.NovelStatus.Completed;
|
||||
break;
|
||||
}
|
||||
});
|
||||
loadedCheerio('div.summary__content .code-block,script').remove();
|
||||
novel.summary =
|
||||
loadedCheerio('div.summary__content').text().trim() ||
|
||||
loadedCheerio('#tab-manga-about').text().trim() ||
|
||||
loadedCheerio('.post-content_item h5:contains("Summary")').next().text().trim();
|
||||
if (!(((_a = this.options) === null || _a === void 0 ? void 0 : _a.useNewChapterEndpoint) !== true)) return [3 /*break*/, 3];
|
||||
novelId = loadedCheerio('.rating-post-id').attr('value') ||
|
||||
loadedCheerio('#manga-chapters-holder').attr('data-id') || '';
|
||||
formData = new FormData();
|
||||
formData.append("action", "manga_get_chapters");
|
||||
formData.append("manga", novelId);
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(this.site + 'wp-admin/admin-ajax.php', {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
})
|
||||
.then(function (res) { return res.text(); })];
|
||||
case 2:
|
||||
html = _b.sent();
|
||||
return [3 /*break*/, 5];
|
||||
case 3: return [4 /*yield*/, (0, fetch_1.fetchApi)(novelUrl + 'ajax/chapters/', { method: 'POST' })
|
||||
.then(function (res) { return res.text(); })];
|
||||
case 4:
|
||||
html = _b.sent();
|
||||
_b.label = 5;
|
||||
case 5:
|
||||
if (html !== '0') {
|
||||
loadedCheerio = (0, cheerio_1.load)(html);
|
||||
}
|
||||
chapters = [];
|
||||
loadedCheerio('.wp-manga-chapter').each(function () {
|
||||
var chapterName = loadedCheerio(this).find('a').text().trim();
|
||||
var releaseDate = null;
|
||||
releaseDate = loadedCheerio(this)
|
||||
.find('span.chapter-release-date')
|
||||
.text()
|
||||
.trim();
|
||||
if (releaseDate) {
|
||||
releaseDate = (0, parseMadaraDate_1.parseMadaraDate)(releaseDate);
|
||||
}
|
||||
else {
|
||||
/**
|
||||
* Insert current date
|
||||
*/
|
||||
releaseDate = (0, dayjs_1.default)().format('LL');
|
||||
}
|
||||
var chapterUrl = loadedCheerio(this).find('a').attr('href') || '';
|
||||
chapters.push({ name: chapterName, releaseTime: releaseDate, url: chapterUrl });
|
||||
});
|
||||
novel.chapters = chapters.reverse();
|
||||
return [2 /*return*/, novel];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
MadaraPlugin.prototype.parseChapter = function (chapterUrl) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var body, loadedCheerio, chapterText;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)(chapterUrl).then(function (res) { return res.text(); })];
|
||||
case 1:
|
||||
body = _a.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
chapterText = loadedCheerio('.text-left').html() ||
|
||||
loadedCheerio('.text-right').html() ||
|
||||
loadedCheerio('.entry-content').html() || "";
|
||||
return [2 /*return*/, chapterText];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
MadaraPlugin.prototype.searchNovels = function (searchTerm, pageNo) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var novels, url, body, loadedCheerio;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
novels = [];
|
||||
url = this.site + "?s=" + searchTerm + "&post_type=wp-manga";
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
|
||||
case 1:
|
||||
body = _a.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
loadedCheerio('.c-tabs-item__content').each(function () {
|
||||
var novelName = loadedCheerio(this).find('.post-title').text().trim();
|
||||
var image = loadedCheerio(this).find('img');
|
||||
var novelCover = image.attr('data-src') || image.attr('src');
|
||||
var novelUrl = loadedCheerio(this)
|
||||
.find('.post-title')
|
||||
.find('a')
|
||||
.attr('href') || '';
|
||||
var novel = {
|
||||
name: novelName,
|
||||
cover: novelCover,
|
||||
url: novelUrl,
|
||||
};
|
||||
novels.push(novel);
|
||||
});
|
||||
return [2 /*return*/, novels];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
MadaraPlugin.prototype.fetchImage = function (url) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, (0, fetch_1.fetchFile)(url, {})];
|
||||
case 1: return [2 /*return*/, _a.sent()];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "cratenovel", "sourceSite": "https://cratenovel.com/", "sourceName": "CrateNovel", "filters": [], "options": { "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "daonovel", "sourceSite": "https://daonovel.com/", "sourceName": "DaoNovel", "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": "Picker" }], "options": { "path": { "novels": "novels-list", "novel": "novels", "chapter": "novels" }, "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
var plugin = new MadaraPlugin({ "id": "daonovel", "sourceSite": "https://daonovel.com/", "sourceName": "DaoNovel", "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": 1 }], "options": { "path": { "novels": "novels-list", "novel": "novels", "chapter": "novels" }, "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "fanTLS", "sourceSite": "https://fanstranslations.com/", "sourceName": "Fans Translations", "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": "Picker" }], "options": { "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
var plugin = new MadaraPlugin({ "id": "fanTLS", "sourceSite": "https://fanstranslations.com/", "sourceName": "Fans Translations", "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": 1 }], "options": { "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "1stkissnovel", "sourceSite": "https://1stkissnovel.org/", "sourceName": "FirstKissNovel", "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": "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": "Picker" }], "options": { "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
var plugin = new MadaraPlugin({ "id": "1stkissnovel", "sourceSite": "https://1stkissnovel.org/", "sourceName": "FirstKissNovel", "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": 1 }, { "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": 1 }], "options": { "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "freenovel.me", "sourceSite": "https://freenovel.me/", "sourceName": "FreeNovelMe", "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": "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": "Picker" }], "options": { "lang": "English" } });
|
||||
var plugin = new MadaraPlugin({ "id": "freenovel.me", "sourceSite": "https://freenovel.me/", "sourceName": "FreeNovelMe", "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": 1 }, { "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": 1 }], "options": { "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "guavaread", "sourceSite": "https://guavaread.com/", "sourceName": "Guavaread", "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": "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": "Picker" }], "options": { "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
var plugin = new MadaraPlugin({ "id": "guavaread", "sourceSite": "https://guavaread.com/", "sourceName": "Guavaread", "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": 1 }, { "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": 1 }], "options": { "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "lnheaven", "sourceSite": "https://lightnovelheaven.com/", "sourceName": "LightNovelHeaven", "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": "Picker" }], "options": { "path": { "novels": "series", "novel": "series", "chapter": "series" }, "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
var plugin = new MadaraPlugin({ "id": "lnheaven", "sourceSite": "https://lightnovelheaven.com/", "sourceName": "LightNovelHeaven", "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": 1 }], "options": { "path": { "novels": "series", "novel": "series", "chapter": "series" }, "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "lunarletters", "sourceSite": "https://www.lunarletters.com/", "sourceName": "LunarLetters", "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": "Picker" }], "options": { "path": { "novels": "series", "novel": "series", "chapter": "series" }, "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
var plugin = new MadaraPlugin({ "id": "lunarletters", "sourceSite": "https://www.lunarletters.com/", "sourceName": "LunarLetters", "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": 1 }], "options": { "path": { "novels": "series", "novel": "series", "chapter": "series" }, "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -1,269 +0,0 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var fetch_1 = require("@libs/fetch");
|
||||
var cheerio_1 = require("cheerio");
|
||||
var defaultCover_1 = require("@libs/defaultCover");
|
||||
var novelStatus_1 = require("@libs/novelStatus");
|
||||
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
|
||||
var dayjs_1 = __importDefault(require("dayjs"));
|
||||
var MadaraDefaultPath = {
|
||||
novels: 'novel',
|
||||
novel: 'novel',
|
||||
chapter: 'novel'
|
||||
};
|
||||
var MadaraPlugin = /** @class */ (function () {
|
||||
function MadaraPlugin(metadata) {
|
||||
this.id = metadata.id;
|
||||
this.name = metadata.sourceName + "[madara]";
|
||||
var iconFileName = metadata.sourceName.replace(/\s+/g, "").toLowerCase();
|
||||
this.icon = "multisrc/madara/icons/".concat(iconFileName, ".png");
|
||||
this.site = metadata.sourceSite;
|
||||
this.version = "1.0.0";
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
var filters = _a.filters, showLatestNovels = _a.showLatestNovels;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var novels, url, body, loadedCheerio;
|
||||
return __generator(this, function (_h) {
|
||||
switch (_h.label) {
|
||||
case 0:
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
url += '/page/' + pageNo + '/' +
|
||||
'?m_orderby=' + (showLatestNovels ? 'latest' : ((filters === null || filters === void 0 ? void 0 : filters.sort) || 'rating'));
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
|
||||
case 1:
|
||||
body = _h.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
loadedCheerio('.manga-title-badges').remove();
|
||||
loadedCheerio('.page-item-detail').each(function () {
|
||||
var novelName = loadedCheerio(this).find('.post-title').text().trim();
|
||||
var image = loadedCheerio(this).find('img');
|
||||
var novelCover = image.attr('data-src') || image.attr('src');
|
||||
var novelUrl = loadedCheerio(this).find('.post-title')
|
||||
.find('a')
|
||||
.attr('href') || '';
|
||||
var novel = {
|
||||
name: novelName,
|
||||
cover: novelCover,
|
||||
url: novelUrl,
|
||||
};
|
||||
novels.push(novel);
|
||||
});
|
||||
return [2 /*return*/, novels];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
MadaraPlugin.prototype.parseNovelAndChapters = function (novelUrl) {
|
||||
var _a;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var novel, body, loadedCheerio, html, novelId, formData, chapters;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
novel = {
|
||||
url: novelUrl,
|
||||
};
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(novelUrl).then(function (res) { return res.text(); })];
|
||||
case 1:
|
||||
body = _b.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
loadedCheerio('.manga-title-badges, #manga-title span').remove();
|
||||
novel.name =
|
||||
loadedCheerio('.post-title h1').text().trim() ||
|
||||
loadedCheerio('#manga-title h1').text();
|
||||
novel.cover =
|
||||
loadedCheerio('.summary_image > a > img').attr('data-lazy-src') ||
|
||||
loadedCheerio('.summary_image > a > img').attr('data-src') ||
|
||||
loadedCheerio('.summary_image > a > img').attr('src') ||
|
||||
defaultCover_1.defaultCover;
|
||||
loadedCheerio('.post-content_item, .post-content').each(function () {
|
||||
var detailName = loadedCheerio(this).find('h5').text().trim();
|
||||
var detail = loadedCheerio(this).find('.summary-content').text().trim();
|
||||
switch (detailName) {
|
||||
case 'Genre(s)':
|
||||
case 'التصنيفات':
|
||||
novel.genres = detail.replace(/[\\t\\n]/g, ',');
|
||||
break;
|
||||
case 'Author(s)':
|
||||
case 'المؤلف':
|
||||
case 'المؤلف (ين)':
|
||||
novel.author = detail;
|
||||
break;
|
||||
case 'Status':
|
||||
case 'الحالة':
|
||||
novel.status =
|
||||
detail.includes('OnGoing') || detail.includes('مستمرة')
|
||||
? novelStatus_1.NovelStatus.Ongoing
|
||||
: novelStatus_1.NovelStatus.Completed;
|
||||
break;
|
||||
}
|
||||
});
|
||||
loadedCheerio('div.summary__content .code-block,script').remove();
|
||||
novel.summary =
|
||||
loadedCheerio('div.summary__content').text().trim() ||
|
||||
loadedCheerio('#tab-manga-about').text().trim() ||
|
||||
loadedCheerio('.post-content_item h5:contains("Summary")').next().text().trim();
|
||||
if (!(((_a = this.options) === null || _a === void 0 ? void 0 : _a.useNewChapterEndpoint) !== true)) return [3 /*break*/, 3];
|
||||
novelId = loadedCheerio('.rating-post-id').attr('value') ||
|
||||
loadedCheerio('#manga-chapters-holder').attr('data-id') || '';
|
||||
formData = new FormData();
|
||||
formData.append("action", "manga_get_chapters");
|
||||
formData.append("manga", novelId);
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(this.site + 'wp-admin/admin-ajax.php', {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
})
|
||||
.then(function (res) { return res.text(); })];
|
||||
case 2:
|
||||
html = _b.sent();
|
||||
return [3 /*break*/, 5];
|
||||
case 3: return [4 /*yield*/, (0, fetch_1.fetchApi)(novelUrl + 'ajax/chapters/', { method: 'POST' })
|
||||
.then(function (res) { return res.text(); })];
|
||||
case 4:
|
||||
html = _b.sent();
|
||||
_b.label = 5;
|
||||
case 5:
|
||||
if (html !== '0') {
|
||||
loadedCheerio = (0, cheerio_1.load)(html);
|
||||
}
|
||||
chapters = [];
|
||||
loadedCheerio('.wp-manga-chapter').each(function () {
|
||||
var chapterName = loadedCheerio(this).find('a').text().trim();
|
||||
var releaseDate = null;
|
||||
releaseDate = loadedCheerio(this)
|
||||
.find('span.chapter-release-date')
|
||||
.text()
|
||||
.trim();
|
||||
if (releaseDate) {
|
||||
releaseDate = (0, parseMadaraDate_1.parseMadaraDate)(releaseDate);
|
||||
}
|
||||
else {
|
||||
/**
|
||||
* Insert current date
|
||||
*/
|
||||
releaseDate = (0, dayjs_1.default)().format('LL');
|
||||
}
|
||||
var chapterUrl = loadedCheerio(this).find('a').attr('href') || '';
|
||||
chapters.push({ name: chapterName, releaseTime: releaseDate, url: chapterUrl });
|
||||
});
|
||||
novel.chapters = chapters.reverse();
|
||||
return [2 /*return*/, novel];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
MadaraPlugin.prototype.parseChapter = function (chapterUrl) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var body, loadedCheerio, chapterText;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)(chapterUrl).then(function (res) { return res.text(); })];
|
||||
case 1:
|
||||
body = _a.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
chapterText = loadedCheerio('.text-left').html() ||
|
||||
loadedCheerio('.text-right').html() ||
|
||||
loadedCheerio('.entry-content').html() || "";
|
||||
return [2 /*return*/, chapterText];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
MadaraPlugin.prototype.searchNovels = function (searchTerm, pageNo) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var novels, url, body, loadedCheerio;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
novels = [];
|
||||
url = this.site + "?s=" + searchTerm + "&post_type=wp-manga";
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
|
||||
case 1:
|
||||
body = _a.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
loadedCheerio('.c-tabs-item__content').each(function () {
|
||||
var novelName = loadedCheerio(this).find('.post-title').text().trim();
|
||||
var image = loadedCheerio(this).find('img');
|
||||
var novelCover = image.attr('data-src') || image.attr('src');
|
||||
var novelUrl = loadedCheerio(this)
|
||||
.find('.post-title')
|
||||
.find('a')
|
||||
.attr('href') || '';
|
||||
var novel = {
|
||||
name: novelName,
|
||||
cover: novelCover,
|
||||
url: novelUrl,
|
||||
};
|
||||
novels.push(novel);
|
||||
});
|
||||
return [2 /*return*/, novels];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
MadaraPlugin.prototype.fetchImage = function (url) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, (0, fetch_1.fetchFile)(url, {})];
|
||||
case 1: return [2 /*return*/, _a.sent()];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "mtlnovel.club", "sourceSite": "https://mtlnovel.club/", "sourceName": "MTLNovel.Club", "filters": [], "options": { "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "mtl-novel", "sourceSite": "https://mtl-novel.com/", "sourceName": "MTL-Novel", "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": "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": "Picker" }], "options": { "path": { "genres": "manga-genre" }, "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
var plugin = new MadaraPlugin({ "id": "mtl-novel", "sourceSite": "https://mtl-novel.com/", "sourceName": "MTL-Novel", "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": 1 }, { "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": 1 }], "options": { "path": { "genres": "manga-genre" }, "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "mostnovel", "sourceSite": "https://mostnovel.com/", "sourceName": "MostNovel", "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": "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": "Picker" }], "options": { "path": { "novels": "manga", "novel": "manga", "chapter": "manga", "genres": "manga-genre" }, "lang": "English" } });
|
||||
var plugin = new MadaraPlugin({ "id": "mostnovel", "sourceSite": "https://mostnovel.com/", "sourceName": "MostNovel", "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": 1 }, { "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": 1 }], "options": { "path": { "novels": "manga", "novel": "manga", "chapter": "manga", "genres": "manga-genre" }, "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "mysticalmerries", "sourceSite": "https://mysticalmerries.com/", "sourceName": "MysticalSeries", "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": "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": "Picker" }], "options": { "path": { "novels": "series", "novel": "series", "chapter": "series", "genres": "genre" }, "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
var plugin = new MadaraPlugin({ "id": "mysticalmerries", "sourceSite": "https://mysticalmerries.com/", "sourceName": "MysticalSeries", "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": 1 }, { "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": 1 }], "options": { "path": { "novels": "series", "novel": "series", "chapter": "series", "genres": "genre" }, "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "neosekaiTLS", "sourceSite": "https://www.neosekaitranslations.com/", "sourceName": "NeoSekai Translations", "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": "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": "Picker" }], "options": { "lang": "English" } });
|
||||
var plugin = new MadaraPlugin({ "id": "neosekaiTLS", "sourceSite": "https://www.neosekaitranslations.com/", "sourceName": "NeoSekai Translations", "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": 1 }, { "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": 1 }], "options": { "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "nocturneTLS", "sourceSite": "https://nocturnetls.net/", "sourceName": "Nocturne Translations", "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": "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": "Picker" }], "options": { "path": { "novels": "novels", "novel": "novels", "chapter": "novels", "genres": "manga-genre" }, "lang": "English" } });
|
||||
var plugin = new MadaraPlugin({ "id": "nocturneTLS", "sourceSite": "https://nocturnetls.net/", "sourceName": "Nocturne Translations", "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": 1 }, { "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": 1 }], "options": { "path": { "novels": "novels", "novel": "novels", "chapter": "novels", "genres": "manga-genre" }, "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -1,269 +0,0 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var fetch_1 = require("@libs/fetch");
|
||||
var cheerio_1 = require("cheerio");
|
||||
var defaultCover_1 = require("@libs/defaultCover");
|
||||
var novelStatus_1 = require("@libs/novelStatus");
|
||||
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
|
||||
var dayjs_1 = __importDefault(require("dayjs"));
|
||||
var MadaraDefaultPath = {
|
||||
novels: 'novel',
|
||||
novel: 'novel',
|
||||
chapter: 'novel'
|
||||
};
|
||||
var MadaraPlugin = /** @class */ (function () {
|
||||
function MadaraPlugin(metadata) {
|
||||
this.id = metadata.id;
|
||||
this.name = metadata.sourceName + "[madara]";
|
||||
var iconFileName = metadata.sourceName.replace(/\s+/g, "").toLowerCase();
|
||||
this.icon = "multisrc/madara/icons/".concat(iconFileName, ".png");
|
||||
this.site = metadata.sourceSite;
|
||||
this.version = "1.0.0";
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
var filters = _a.filters, showLatestNovels = _a.showLatestNovels;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var novels, url, body, loadedCheerio;
|
||||
return __generator(this, function (_h) {
|
||||
switch (_h.label) {
|
||||
case 0:
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
url += '/page/' + pageNo + '/' +
|
||||
'?m_orderby=' + (showLatestNovels ? 'latest' : ((filters === null || filters === void 0 ? void 0 : filters.sort) || 'rating'));
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
|
||||
case 1:
|
||||
body = _h.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
loadedCheerio('.manga-title-badges').remove();
|
||||
loadedCheerio('.page-item-detail').each(function () {
|
||||
var novelName = loadedCheerio(this).find('.post-title').text().trim();
|
||||
var image = loadedCheerio(this).find('img');
|
||||
var novelCover = image.attr('data-src') || image.attr('src');
|
||||
var novelUrl = loadedCheerio(this).find('.post-title')
|
||||
.find('a')
|
||||
.attr('href') || '';
|
||||
var novel = {
|
||||
name: novelName,
|
||||
cover: novelCover,
|
||||
url: novelUrl,
|
||||
};
|
||||
novels.push(novel);
|
||||
});
|
||||
return [2 /*return*/, novels];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
MadaraPlugin.prototype.parseNovelAndChapters = function (novelUrl) {
|
||||
var _a;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var novel, body, loadedCheerio, html, novelId, formData, chapters;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
novel = {
|
||||
url: novelUrl,
|
||||
};
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(novelUrl).then(function (res) { return res.text(); })];
|
||||
case 1:
|
||||
body = _b.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
loadedCheerio('.manga-title-badges, #manga-title span').remove();
|
||||
novel.name =
|
||||
loadedCheerio('.post-title h1').text().trim() ||
|
||||
loadedCheerio('#manga-title h1').text();
|
||||
novel.cover =
|
||||
loadedCheerio('.summary_image > a > img').attr('data-lazy-src') ||
|
||||
loadedCheerio('.summary_image > a > img').attr('data-src') ||
|
||||
loadedCheerio('.summary_image > a > img').attr('src') ||
|
||||
defaultCover_1.defaultCover;
|
||||
loadedCheerio('.post-content_item, .post-content').each(function () {
|
||||
var detailName = loadedCheerio(this).find('h5').text().trim();
|
||||
var detail = loadedCheerio(this).find('.summary-content').text().trim();
|
||||
switch (detailName) {
|
||||
case 'Genre(s)':
|
||||
case 'التصنيفات':
|
||||
novel.genres = detail.replace(/[\\t\\n]/g, ',');
|
||||
break;
|
||||
case 'Author(s)':
|
||||
case 'المؤلف':
|
||||
case 'المؤلف (ين)':
|
||||
novel.author = detail;
|
||||
break;
|
||||
case 'Status':
|
||||
case 'الحالة':
|
||||
novel.status =
|
||||
detail.includes('OnGoing') || detail.includes('مستمرة')
|
||||
? novelStatus_1.NovelStatus.Ongoing
|
||||
: novelStatus_1.NovelStatus.Completed;
|
||||
break;
|
||||
}
|
||||
});
|
||||
loadedCheerio('div.summary__content .code-block,script').remove();
|
||||
novel.summary =
|
||||
loadedCheerio('div.summary__content').text().trim() ||
|
||||
loadedCheerio('#tab-manga-about').text().trim() ||
|
||||
loadedCheerio('.post-content_item h5:contains("Summary")').next().text().trim();
|
||||
if (!(((_a = this.options) === null || _a === void 0 ? void 0 : _a.useNewChapterEndpoint) !== true)) return [3 /*break*/, 3];
|
||||
novelId = loadedCheerio('.rating-post-id').attr('value') ||
|
||||
loadedCheerio('#manga-chapters-holder').attr('data-id') || '';
|
||||
formData = new FormData();
|
||||
formData.append("action", "manga_get_chapters");
|
||||
formData.append("manga", novelId);
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(this.site + 'wp-admin/admin-ajax.php', {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
})
|
||||
.then(function (res) { return res.text(); })];
|
||||
case 2:
|
||||
html = _b.sent();
|
||||
return [3 /*break*/, 5];
|
||||
case 3: return [4 /*yield*/, (0, fetch_1.fetchApi)(novelUrl + 'ajax/chapters/', { method: 'POST' })
|
||||
.then(function (res) { return res.text(); })];
|
||||
case 4:
|
||||
html = _b.sent();
|
||||
_b.label = 5;
|
||||
case 5:
|
||||
if (html !== '0') {
|
||||
loadedCheerio = (0, cheerio_1.load)(html);
|
||||
}
|
||||
chapters = [];
|
||||
loadedCheerio('.wp-manga-chapter').each(function () {
|
||||
var chapterName = loadedCheerio(this).find('a').text().trim();
|
||||
var releaseDate = null;
|
||||
releaseDate = loadedCheerio(this)
|
||||
.find('span.chapter-release-date')
|
||||
.text()
|
||||
.trim();
|
||||
if (releaseDate) {
|
||||
releaseDate = (0, parseMadaraDate_1.parseMadaraDate)(releaseDate);
|
||||
}
|
||||
else {
|
||||
/**
|
||||
* Insert current date
|
||||
*/
|
||||
releaseDate = (0, dayjs_1.default)().format('LL');
|
||||
}
|
||||
var chapterUrl = loadedCheerio(this).find('a').attr('href') || '';
|
||||
chapters.push({ name: chapterName, releaseTime: releaseDate, url: chapterUrl });
|
||||
});
|
||||
novel.chapters = chapters.reverse();
|
||||
return [2 /*return*/, novel];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
MadaraPlugin.prototype.parseChapter = function (chapterUrl) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var body, loadedCheerio, chapterText;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)(chapterUrl).then(function (res) { return res.text(); })];
|
||||
case 1:
|
||||
body = _a.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
chapterText = loadedCheerio('.text-left').html() ||
|
||||
loadedCheerio('.text-right').html() ||
|
||||
loadedCheerio('.entry-content').html() || "";
|
||||
return [2 /*return*/, chapterText];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
MadaraPlugin.prototype.searchNovels = function (searchTerm, pageNo) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var novels, url, body, loadedCheerio;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
novels = [];
|
||||
url = this.site + "?s=" + searchTerm + "&post_type=wp-manga";
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
|
||||
case 1:
|
||||
body = _a.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
loadedCheerio('.c-tabs-item__content').each(function () {
|
||||
var novelName = loadedCheerio(this).find('.post-title').text().trim();
|
||||
var image = loadedCheerio(this).find('img');
|
||||
var novelCover = image.attr('data-src') || image.attr('src');
|
||||
var novelUrl = loadedCheerio(this)
|
||||
.find('.post-title')
|
||||
.find('a')
|
||||
.attr('href') || '';
|
||||
var novel = {
|
||||
name: novelName,
|
||||
cover: novelCover,
|
||||
url: novelUrl,
|
||||
};
|
||||
novels.push(novel);
|
||||
});
|
||||
return [2 /*return*/, novels];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
MadaraPlugin.prototype.fetchImage = function (url) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, (0, fetch_1.fetchFile)(url, {})];
|
||||
case 1: return [2 /*return*/, _a.sent()];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "noobchanTL", "sourceSite": "https://noobchan.xyz/", "sourceName": "Noobchan Translation", "filters": [], "options": { "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "novelmultiverse", "sourceSite": "https://www.novelmultiverse.com/", "sourceName": "NovelMultiverse", "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": "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": "Picker" }], "options": { "lang": "English" } });
|
||||
var plugin = new MadaraPlugin({ "id": "novelmultiverse", "sourceSite": "https://www.novelmultiverse.com/", "sourceName": "NovelMultiverse", "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": 1 }, { "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": 1 }], "options": { "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "novelr18", "sourceSite": "https://novelr18.com/", "sourceName": "NovelR18", "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": "Picker" }], "options": { "path": { "novels": "novel", "novel": "manga", "chapter": "manga" }, "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
var plugin = new MadaraPlugin({ "id": "novelr18", "sourceSite": "https://novelr18.com/", "sourceName": "NovelR18", "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": 1 }], "options": { "path": { "novel": "manga", "chapter": "manga" }, "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "novelTL", "sourceSite": "https://noveltranslate.com/", "sourceName": "NovelTranslate", "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": "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": "Picker" }], "options": { "path": { "novels": "all-novels", "novel": "manga", "chapter": "manga", "genres": "manga-genre" }, "lang": "English" } });
|
||||
var plugin = new MadaraPlugin({ "id": "novelTL", "sourceSite": "https://noveltranslate.com/", "sourceName": "NovelTranslate", "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": 1 }, { "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": 1 }], "options": { "path": { "novels": "all-novels", "novel": "manga", "chapter": "manga", "genres": "manga-genre" }, "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "novelstic", "sourceSite": "https://novelstic.com/", "sourceName": "Novelstic", "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": "Picker" }], "options": { "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
var plugin = new MadaraPlugin({ "id": "novelstic", "sourceSite": "https://novelstic.com/", "sourceName": "Novelstic", "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": 1 }], "options": { "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -1,269 +0,0 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var fetch_1 = require("@libs/fetch");
|
||||
var cheerio_1 = require("cheerio");
|
||||
var defaultCover_1 = require("@libs/defaultCover");
|
||||
var novelStatus_1 = require("@libs/novelStatus");
|
||||
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
|
||||
var dayjs_1 = __importDefault(require("dayjs"));
|
||||
var MadaraDefaultPath = {
|
||||
novels: 'novel',
|
||||
novel: 'novel',
|
||||
chapter: 'novel'
|
||||
};
|
||||
var MadaraPlugin = /** @class */ (function () {
|
||||
function MadaraPlugin(metadata) {
|
||||
this.id = metadata.id;
|
||||
this.name = metadata.sourceName + "[madara]";
|
||||
var iconFileName = metadata.sourceName.replace(/\s+/g, "").toLowerCase();
|
||||
this.icon = "multisrc/madara/icons/".concat(iconFileName, ".png");
|
||||
this.site = metadata.sourceSite;
|
||||
this.version = "1.0.0";
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
var filters = _a.filters, showLatestNovels = _a.showLatestNovels;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var novels, url, body, loadedCheerio;
|
||||
return __generator(this, function (_h) {
|
||||
switch (_h.label) {
|
||||
case 0:
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
url += '/page/' + pageNo + '/' +
|
||||
'?m_orderby=' + (showLatestNovels ? 'latest' : ((filters === null || filters === void 0 ? void 0 : filters.sort) || 'rating'));
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
|
||||
case 1:
|
||||
body = _h.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
loadedCheerio('.manga-title-badges').remove();
|
||||
loadedCheerio('.page-item-detail').each(function () {
|
||||
var novelName = loadedCheerio(this).find('.post-title').text().trim();
|
||||
var image = loadedCheerio(this).find('img');
|
||||
var novelCover = image.attr('data-src') || image.attr('src');
|
||||
var novelUrl = loadedCheerio(this).find('.post-title')
|
||||
.find('a')
|
||||
.attr('href') || '';
|
||||
var novel = {
|
||||
name: novelName,
|
||||
cover: novelCover,
|
||||
url: novelUrl,
|
||||
};
|
||||
novels.push(novel);
|
||||
});
|
||||
return [2 /*return*/, novels];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
MadaraPlugin.prototype.parseNovelAndChapters = function (novelUrl) {
|
||||
var _a;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var novel, body, loadedCheerio, html, novelId, formData, chapters;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
novel = {
|
||||
url: novelUrl,
|
||||
};
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(novelUrl).then(function (res) { return res.text(); })];
|
||||
case 1:
|
||||
body = _b.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
loadedCheerio('.manga-title-badges, #manga-title span').remove();
|
||||
novel.name =
|
||||
loadedCheerio('.post-title h1').text().trim() ||
|
||||
loadedCheerio('#manga-title h1').text();
|
||||
novel.cover =
|
||||
loadedCheerio('.summary_image > a > img').attr('data-lazy-src') ||
|
||||
loadedCheerio('.summary_image > a > img').attr('data-src') ||
|
||||
loadedCheerio('.summary_image > a > img').attr('src') ||
|
||||
defaultCover_1.defaultCover;
|
||||
loadedCheerio('.post-content_item, .post-content').each(function () {
|
||||
var detailName = loadedCheerio(this).find('h5').text().trim();
|
||||
var detail = loadedCheerio(this).find('.summary-content').text().trim();
|
||||
switch (detailName) {
|
||||
case 'Genre(s)':
|
||||
case 'التصنيفات':
|
||||
novel.genres = detail.replace(/[\\t\\n]/g, ',');
|
||||
break;
|
||||
case 'Author(s)':
|
||||
case 'المؤلف':
|
||||
case 'المؤلف (ين)':
|
||||
novel.author = detail;
|
||||
break;
|
||||
case 'Status':
|
||||
case 'الحالة':
|
||||
novel.status =
|
||||
detail.includes('OnGoing') || detail.includes('مستمرة')
|
||||
? novelStatus_1.NovelStatus.Ongoing
|
||||
: novelStatus_1.NovelStatus.Completed;
|
||||
break;
|
||||
}
|
||||
});
|
||||
loadedCheerio('div.summary__content .code-block,script').remove();
|
||||
novel.summary =
|
||||
loadedCheerio('div.summary__content').text().trim() ||
|
||||
loadedCheerio('#tab-manga-about').text().trim() ||
|
||||
loadedCheerio('.post-content_item h5:contains("Summary")').next().text().trim();
|
||||
if (!(((_a = this.options) === null || _a === void 0 ? void 0 : _a.useNewChapterEndpoint) !== true)) return [3 /*break*/, 3];
|
||||
novelId = loadedCheerio('.rating-post-id').attr('value') ||
|
||||
loadedCheerio('#manga-chapters-holder').attr('data-id') || '';
|
||||
formData = new FormData();
|
||||
formData.append("action", "manga_get_chapters");
|
||||
formData.append("manga", novelId);
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(this.site + 'wp-admin/admin-ajax.php', {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
})
|
||||
.then(function (res) { return res.text(); })];
|
||||
case 2:
|
||||
html = _b.sent();
|
||||
return [3 /*break*/, 5];
|
||||
case 3: return [4 /*yield*/, (0, fetch_1.fetchApi)(novelUrl + 'ajax/chapters/', { method: 'POST' })
|
||||
.then(function (res) { return res.text(); })];
|
||||
case 4:
|
||||
html = _b.sent();
|
||||
_b.label = 5;
|
||||
case 5:
|
||||
if (html !== '0') {
|
||||
loadedCheerio = (0, cheerio_1.load)(html);
|
||||
}
|
||||
chapters = [];
|
||||
loadedCheerio('.wp-manga-chapter').each(function () {
|
||||
var chapterName = loadedCheerio(this).find('a').text().trim();
|
||||
var releaseDate = null;
|
||||
releaseDate = loadedCheerio(this)
|
||||
.find('span.chapter-release-date')
|
||||
.text()
|
||||
.trim();
|
||||
if (releaseDate) {
|
||||
releaseDate = (0, parseMadaraDate_1.parseMadaraDate)(releaseDate);
|
||||
}
|
||||
else {
|
||||
/**
|
||||
* Insert current date
|
||||
*/
|
||||
releaseDate = (0, dayjs_1.default)().format('LL');
|
||||
}
|
||||
var chapterUrl = loadedCheerio(this).find('a').attr('href') || '';
|
||||
chapters.push({ name: chapterName, releaseTime: releaseDate, url: chapterUrl });
|
||||
});
|
||||
novel.chapters = chapters.reverse();
|
||||
return [2 /*return*/, novel];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
MadaraPlugin.prototype.parseChapter = function (chapterUrl) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var body, loadedCheerio, chapterText;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)(chapterUrl).then(function (res) { return res.text(); })];
|
||||
case 1:
|
||||
body = _a.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
chapterText = loadedCheerio('.text-left').html() ||
|
||||
loadedCheerio('.text-right').html() ||
|
||||
loadedCheerio('.entry-content').html() || "";
|
||||
return [2 /*return*/, chapterText];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
MadaraPlugin.prototype.searchNovels = function (searchTerm, pageNo) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var novels, url, body, loadedCheerio;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
novels = [];
|
||||
url = this.site + "?s=" + searchTerm + "&post_type=wp-manga";
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
|
||||
case 1:
|
||||
body = _a.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
loadedCheerio('.c-tabs-item__content').each(function () {
|
||||
var novelName = loadedCheerio(this).find('.post-title').text().trim();
|
||||
var image = loadedCheerio(this).find('img');
|
||||
var novelCover = image.attr('data-src') || image.attr('src');
|
||||
var novelUrl = loadedCheerio(this)
|
||||
.find('.post-title')
|
||||
.find('a')
|
||||
.attr('href') || '';
|
||||
var novel = {
|
||||
name: novelName,
|
||||
cover: novelCover,
|
||||
url: novelUrl,
|
||||
};
|
||||
novels.push(novel);
|
||||
});
|
||||
return [2 /*return*/, novels];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
MadaraPlugin.prototype.fetchImage = function (url) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, (0, fetch_1.fetchFile)(url, {})];
|
||||
case 1: return [2 /*return*/, _a.sent()];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "onlymtl", "sourceSite": "https://www.onlymtl.com/", "sourceName": "OnlyMTL", "filters": [], "options": { "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "readwebnovels", "sourceSite": "https://readwebnovels.net/", "sourceName": "ReadWebNovels", "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": "Picker" }], "options": { "lang": "English" } });
|
||||
var plugin = new MadaraPlugin({ "id": "readwebnovels", "sourceSite": "https://readwebnovels.net/", "sourceName": "ReadWebNovels", "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": 1 }], "options": { "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "sleeptTLS", "sourceSite": "https://sleepytranslations.com/", "sourceName": "SleepyTranslations", "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": "Picker" }], "options": { "path": { "novels": "series", "novel": "series", "chapter": "series" }, "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
var plugin = new MadaraPlugin({ "id": "sleeptTLS", "sourceSite": "https://sleepytranslations.com/", "sourceName": "SleepyTranslations", "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": 1 }], "options": { "path": { "novels": "series", "novel": "series", "chapter": "series" }, "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "sonicmtl", "sourceSite": "https://www.sonicmtl.com/", "sourceName": "SonicMTL", "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": "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": "Picker" }], "options": { "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
var plugin = new MadaraPlugin({ "id": "sonicmtl", "sourceSite": "https://www.sonicmtl.com/", "sourceName": "SonicMTL", "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": 1 }, { "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": 1 }], "options": { "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "sweetEscapeTL", "sourceSite": "https://sweetescapetranslations.com/", "sourceName": "Sweet Escape Translations", "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": "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": "Picker" }], "options": { "path": { "novels": "manga", "novel": "manga", "chapter": "manga", "genres": "manga-genre" }, "useNewChapterEndpoint": false, "lang": "English" } });
|
||||
var plugin = new MadaraPlugin({ "id": "sweetEscapeTL", "sourceSite": "https://sweetescapetranslations.com/", "sourceName": "Sweet Escape Translations", "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": 1 }, { "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": 1 }], "options": { "path": { "novels": "manga", "novel": "manga", "chapter": "manga", "genres": "manga-genre" }, "useNewChapterEndpoint": false, "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "webnovelover", "sourceSite": "https://www.webnovelover.com/", "sourceName": "WebNovelLover", "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": "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": "Picker" }], "options": { "lang": "English" } });
|
||||
var plugin = new MadaraPlugin({ "id": "webnovelover", "sourceSite": "https://www.webnovelover.com/", "sourceName": "WebNovelLover", "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": 1 }, { "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": 1 }], "options": { "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "wuxiaworld.site", "sourceSite": "https://wuxiaworld.site/", "sourceName": "WuxiaWorld.Site", "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": "Picker" }], "options": { "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
var plugin = new MadaraPlugin({ "id": "wuxiaworld.site", "sourceSite": "https://wuxiaworld.site/", "sourceName": "WuxiaWorld.Site", "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": 1 }], "options": { "useNewChapterEndpoint": true, "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "zetroTL", "sourceSite": "https://zetrotranslation.com/", "sourceName": "Zetro Translation", "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": "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": "Picker" }], "options": { "path": { "genres": "genre" }, "lang": "English" } });
|
||||
var plugin = new MadaraPlugin({ "id": "zetroTL", "sourceSite": "https://zetrotranslation.com/", "sourceName": "Zetro Translation", "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": 1 }, { "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": 1 }], "options": { "path": { "genres": "genre" }, "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "zinnovel", "sourceSite": "https://zinnovel.com/", "sourceName": "ZinnNovel", "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": "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": "Picker" }], "options": { "path": { "novels": "manga", "novel": "manga", "chapter": "manga", "genres": "manga-genre" }, "lang": "English" } });
|
||||
var plugin = new MadaraPlugin({ "id": "zinnovel", "sourceSite": "https://zinnovel.com/", "sourceName": "ZinnNovel", "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": 1 }, { "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": 1 }], "options": { "path": { "novels": "manga", "novel": "manga", "chapter": "manga", "genres": "manga-genre" }, "lang": "English" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "meionovel", "sourceSite": "https://meionovel.id/", "sourceName": "MeioNovel", "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": "Picker" }, { "key": "genres", "label": "GENRES", "values": [{ "label": "Action", "value": "action" }, { "label": "Adventure", "value": "adventure" }, { "label": "Comedy", "value": "comedy" }, { "label": "Cooking", "value": "cooking" }, { "label": "Drama", "value": "drama" }, { "label": "Ecchi", "value": "ecchi" }, { "label": "Fanfiction", "value": "fanfiction" }, { "label": "Fantasy", "value": "fantasy" }, { "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": "Magic", "value": "magic" }, { "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": "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": "Supernatural", "value": "supernatural" }, { "label": "Tragedy", "value": "tragedy" }, { "label": "Virtual Reality", "value": "virtual-reality" }, { "label": "Wuxia", "value": "wuxia" }, { "label": "Xianxia", "value": "xianxia" }, { "label": "Xuanhuan", "value": "xuanhuan" }, { "label": "Yuri", "value": "yuri" }], "inputType": "Picker" }], "options": { "useNewChapterEndpoint": true, "lang": "Indonesian" } });
|
||||
var plugin = new MadaraPlugin({ "id": "meionovel", "sourceSite": "https://meionovel.id/", "sourceName": "MeioNovel", "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": 1 }, { "key": "genres", "label": "GENRES", "values": [{ "label": "Action", "value": "action" }, { "label": "Adventure", "value": "adventure" }, { "label": "Comedy", "value": "comedy" }, { "label": "Cooking", "value": "cooking" }, { "label": "Drama", "value": "drama" }, { "label": "Ecchi", "value": "ecchi" }, { "label": "Fanfiction", "value": "fanfiction" }, { "label": "Fantasy", "value": "fantasy" }, { "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": "Magic", "value": "magic" }, { "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": "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": "Supernatural", "value": "supernatural" }, { "label": "Tragedy", "value": "tragedy" }, { "label": "Virtual Reality", "value": "virtual-reality" }, { "label": "Wuxia", "value": "wuxia" }, { "label": "Xianxia", "value": "xianxia" }, { "label": "Xuanhuan", "value": "xuanhuan" }, { "label": "Yuri", "value": "yuri" }], "inputType": 1 }], "options": { "useNewChapterEndpoint": true, "lang": "Indonesian" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "morenovel", "sourceSite": "https://morenovel.net/", "sourceName": "MoreNovel", "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": "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": "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": "Tragedy", "value": "tragedy" }, { "label": "Wuxia", "value": "wuxia" }, { "label": "Xianxia", "value": "xianxia" }, { "label": "Xuanhuan", "value": "xuanhuan" }, { "label": "Yaoi", "value": "yaoi" }, { "label": "Yuri", "value": "yuri" }], "inputType": "Picker" }], "options": { "useNewChapterEndpoint": true, "lang": "Indonesian" } });
|
||||
var plugin = new MadaraPlugin({ "id": "morenovel", "sourceSite": "https://morenovel.net/", "sourceName": "MoreNovel", "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": 1 }, { "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": "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": "Tragedy", "value": "tragedy" }, { "label": "Wuxia", "value": "wuxia" }, { "label": "Xianxia", "value": "xianxia" }, { "label": "Xuanhuan", "value": "xuanhuan" }, { "label": "Yaoi", "value": "yaoi" }, { "label": "Yuri", "value": "yuri" }], "inputType": 1 }], "options": { "useNewChapterEndpoint": true, "lang": "Indonesian" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "wbnovel", "sourceSite": "https://wbnovel.com/", "sourceName": "WBNovel", "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": "Picker" }, { "key": "genres", "label": "GENRES", "values": [{ "label": "Action", "value": "action" }, { "label": "Adventure", "value": "adventure" }, { "label": "Alchemy", "value": "alchemy" }, { "label": "Comedy", "value": "comedy" }, { "label": "Crafting", "value": "crafting" }, { "label": "Cultivation", "value": "cultivation" }, { "label": "Drama", "value": "drama" }, { "label": "Dungeon Crawling", "value": "dungeon-crawling" }, { "label": "Eci", "value": "eci" }, { "label": "Fantasy", "value": "fantasy" }, { "label": "Game", "value": "game" }, { "label": "Harem", "value": "harem" }, { "label": "Horror", "value": "horror" }, { "label": "Josei", "value": "josei" }, { "label": "Kingdom Building", "value": "kingdom-building" }, { "label": "Martial Arts", "value": "martial-arts" }, { "label": "Mature", "value": "mature" }, { "label": "Mecha", "value": "mecha" }, { "label": "Modern Setting", "value": "modern-setting" }, { "label": "Mystery", "value": "mystery" }, { "label": "Pets", "value": "pets" }, { "label": "Psychological", "value": "psychological" }, { "label": "Reincarnator", "value": "reincarnator" }, { "label": "Romance", "value": "romance" }, { "label": "School Life", "value": "school-life" }, { "label": "Sci-fi", "value": "sci-fi" }, { "label": "Seinen", "value": "seinen" }, { "label": "Shounen", "value": "shounen" }, { "label": "Slice of Life", "value": "slice-of-life" }, { "label": "Sports", "value": "sports" }, { "label": "Supernatural", "value": "supernatural" }, { "label": "Tragedy", "value": "tragedy" }, { "label": "Transmigration", "value": "transmigration" }, { "label": "Virtual Reality", "value": "virtual-reality" }, { "label": "Wuxia", "value": "wuxia" }, { "label": "Xianxia", "value": "xianxia" }, { "label": "Xuanhuan", "value": "xuanhuan" }], "inputType": "Picker" }], "options": { "lang": "Indonesian" } });
|
||||
var plugin = new MadaraPlugin({ "id": "wbnovel", "sourceSite": "https://wbnovel.com/", "sourceName": "WBNovel", "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": 1 }, { "key": "genres", "label": "GENRES", "values": [{ "label": "Action", "value": "action" }, { "label": "Adventure", "value": "adventure" }, { "label": "Alchemy", "value": "alchemy" }, { "label": "Comedy", "value": "comedy" }, { "label": "Crafting", "value": "crafting" }, { "label": "Cultivation", "value": "cultivation" }, { "label": "Drama", "value": "drama" }, { "label": "Dungeon Crawling", "value": "dungeon-crawling" }, { "label": "Eci", "value": "eci" }, { "label": "Fantasy", "value": "fantasy" }, { "label": "Game", "value": "game" }, { "label": "Harem", "value": "harem" }, { "label": "Horror", "value": "horror" }, { "label": "Josei", "value": "josei" }, { "label": "Kingdom Building", "value": "kingdom-building" }, { "label": "Martial Arts", "value": "martial-arts" }, { "label": "Mature", "value": "mature" }, { "label": "Mecha", "value": "mecha" }, { "label": "Modern Setting", "value": "modern-setting" }, { "label": "Mystery", "value": "mystery" }, { "label": "Pets", "value": "pets" }, { "label": "Psychological", "value": "psychological" }, { "label": "Reincarnator", "value": "reincarnator" }, { "label": "Romance", "value": "romance" }, { "label": "School Life", "value": "school-life" }, { "label": "Sci-fi", "value": "sci-fi" }, { "label": "Seinen", "value": "seinen" }, { "label": "Shounen", "value": "shounen" }, { "label": "Slice of Life", "value": "slice-of-life" }, { "label": "Sports", "value": "sports" }, { "label": "Supernatural", "value": "supernatural" }, { "label": "Tragedy", "value": "tragedy" }, { "label": "Transmigration", "value": "transmigration" }, { "label": "Virtual Reality", "value": "virtual-reality" }, { "label": "Wuxia", "value": "wuxia" }, { "label": "Xianxia", "value": "xianxia" }, { "label": "Xuanhuan", "value": "xuanhuan" }], "inputType": 1 }], "options": { "lang": "Indonesian" } });
|
||||
exports.default = plugin;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,308 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var filterInputs_1 = require("@libs/filterInputs");
|
||||
var fetch_1 = require("@libs/fetch");
|
||||
var cheerio_1 = require("cheerio");
|
||||
var freedlit = /** @class */ (function () {
|
||||
function freedlit() {
|
||||
this.id = "freedlit.space";
|
||||
this.name = "LitSpace";
|
||||
this.site = "https://freedlit.space";
|
||||
this.version = "1.0.0";
|
||||
this.icon = "src/ru/freedlit/icon.png";
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.fetchImage = fetch_1.fetchFile;
|
||||
this.filters = [
|
||||
{
|
||||
key: "sort",
|
||||
label: "Сортировка:",
|
||||
values: [
|
||||
{ label: "По популярности", value: "popular" },
|
||||
{ label: "По количеству комментариев", value: "comments" },
|
||||
{ label: "По количеству лайков", value: "likes" },
|
||||
{ label: "По новизне", value: "recent" },
|
||||
{ label: "По просмотрам", value: "views" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Picker,
|
||||
},
|
||||
{
|
||||
key: "genre",
|
||||
label: "Жанры:",
|
||||
values: [
|
||||
{ label: "Любой жанр", value: "all" },
|
||||
{ label: "Альтернативная история", value: "alternative-history" },
|
||||
{ label: "Антиутопия", value: "dystopia" },
|
||||
{ label: "Бизнес-литература", value: "business-literature" },
|
||||
{ label: "Боевая фантастика", value: "combat-fiction" },
|
||||
{ label: "Боевик", value: "action" },
|
||||
{ label: "Боевое фэнтези", value: "combat-fantasy" },
|
||||
{ label: "Бояръ-Аниме", value: "boyar-anime" },
|
||||
{ label: "Героическая фантастика", value: "heroic-fiction" },
|
||||
{ label: "Героическое фэнтези", value: "heroic-fantasy" },
|
||||
{ label: "Городское фэнтези", value: "urban-fantasy" },
|
||||
{ label: "Гримдарк", value: "grimdark" },
|
||||
{ label: "Детектив", value: "mystery" },
|
||||
{ label: "Детская литература", value: "kids-literature" },
|
||||
{ label: "Документальная проза", value: "biography" },
|
||||
{ label: "Историческая проза", value: "historical-fiction" },
|
||||
{ label: "Исторический детектив", value: "historical-mystery" },
|
||||
{
|
||||
label: "Исторический любовный роман",
|
||||
value: "historical-romantic-novel",
|
||||
},
|
||||
{ label: "Историческое фэнтези", value: "historical-fantasy" },
|
||||
{ label: "Киберпанк", value: "cyberpunk" },
|
||||
{ label: "Космическая фантастика", value: "cosmic-fiction" },
|
||||
{ label: "ЛитРПГ", value: "litrpg" },
|
||||
{ label: "Лоу / Низкое фэнтези", value: "low-fantasy" },
|
||||
{ label: "Любовное фэнтези", value: "romantic-fantasy" },
|
||||
{ label: "Любовный роман", value: "romantic-novel" },
|
||||
{ label: "Мистика", value: "mystic" },
|
||||
{ label: "Мистический детектив", value: "mystic-detective" },
|
||||
{ label: "Научная фантастика", value: "science-fiction" },
|
||||
{ label: "Подростковая проза", value: "young-adult" },
|
||||
{ label: "Политический роман", value: "political-romance" },
|
||||
{ label: "Попаданцы", value: "accidental-travel" },
|
||||
{ label: "Попаданцы в магические миры", value: "magic-worlds-travel" },
|
||||
{ label: "Попаданцы во времени", value: "time-travel" },
|
||||
{ label: "Порнотика", value: "pornotica" },
|
||||
{ label: "Постапокалипсис", value: "post-apocalypse" },
|
||||
{ label: "Поэзия", value: "poetry" },
|
||||
{ label: "Приключения", value: "adventure" },
|
||||
{ label: "Публицистика", value: "journalism" },
|
||||
{ label: "Пьеса", value: "play" },
|
||||
{ label: "Развитие личности", value: "how-to-book" },
|
||||
{ label: "Разное", value: "other" },
|
||||
{ label: "Реализм", value: "Realism" },
|
||||
{ label: "РеалРПГ", value: "realrpg" },
|
||||
{ label: "Репликация", value: "replication" },
|
||||
{ label: "Романтическая эротика", value: "romantic-erotic-fiction" },
|
||||
{ label: "Сказка", value: "fairy-tale" },
|
||||
{ label: "Слэш", value: "slash" },
|
||||
{ label: "Современная проза", value: "modern-prose" },
|
||||
{ label: "Современный любовный роман", value: "modern-romantic-novel" },
|
||||
{ label: "Социальная фантастика", value: "social-fiction" },
|
||||
{ label: "Стимпанк", value: "steampunk" },
|
||||
{ label: "Сценарий", value: "scenario" },
|
||||
{ label: "Сюаньхуань", value: "xuanhuan" },
|
||||
{ label: "Сянься", value: "xianxia" },
|
||||
{ label: "Тёмное фэнтези", value: "dark-fantasy" },
|
||||
{ label: "Триллер", value: "thriller" },
|
||||
{ label: "Уся", value: "wuxia" },
|
||||
{ label: "Фантастика", value: "fiction" },
|
||||
{ label: "Фантастический детектив", value: "mystery-fiction" },
|
||||
{ label: "Фанфик", value: "fan-fiction" },
|
||||
{ label: "Фемслэш", value: "femslash" },
|
||||
{ label: "Фэнтези", value: "fantasy" },
|
||||
{ label: "Хоррор", value: "horror" },
|
||||
{ label: "Шпионский детектив", value: "spy-crime" },
|
||||
{ label: "Эпическое фэнтези", value: "epic-fantasy" },
|
||||
{ label: "Эротика", value: "erotic-fiction" },
|
||||
{ label: "Эротическая фантастика", value: "erotic-fiction" },
|
||||
{ label: "Эротический фанфик", value: "erotic-fan-fiction" },
|
||||
{ label: "Эротическое фэнтези", value: "erotic-fantasy" },
|
||||
{ label: "Этническое фэнтези", value: "ethnic-fantasy" },
|
||||
{ label: "Юмор", value: "humor" },
|
||||
{ label: "Юмористическая фантастика", value: "humor-fiction" },
|
||||
{ label: "Юмористическое фэнтези", value: "humor-fantasy" },
|
||||
{ label: "RPS", value: "rps" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Picker,
|
||||
},
|
||||
{
|
||||
key: "status",
|
||||
label: "Статус:",
|
||||
values: [
|
||||
{ label: "Любой статус", value: "all" },
|
||||
{ label: "В процессе", value: "in-process" },
|
||||
{ label: "Завершено", value: "finished" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Picker,
|
||||
},
|
||||
{
|
||||
key: "access",
|
||||
label: "Доступ:",
|
||||
values: [
|
||||
{ label: "Любой доступ", value: "all" },
|
||||
{ label: "Бесплатные", value: "free" },
|
||||
{ label: "Платные", value: "paid" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Picker,
|
||||
},
|
||||
{
|
||||
key: "adult",
|
||||
label: "Возрастные ограничения:",
|
||||
values: [
|
||||
{ label: "Скрыть 18+", value: "hide" },
|
||||
{ label: "Показать +18", value: "show" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Picker,
|
||||
},
|
||||
];
|
||||
}
|
||||
freedlit.prototype.popularNovels = function (pageNo, _a) {
|
||||
var showLatestNovels = _a.showLatestNovels, filters = _a.filters;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var url, result, body, loadedCheerio, novels;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
url = this.site + "/books/";
|
||||
url += ((filters === null || filters === void 0 ? void 0 : filters.genre) || "all") + "?sort=";
|
||||
url += showLatestNovels ? "recent" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "popular";
|
||||
url += "&status=" + ((filters === null || filters === void 0 ? void 0 : filters.status) || "all");
|
||||
url += "&access=" + ((filters === null || filters === void 0 ? void 0 : filters.access) || "all");
|
||||
url += "&adult=" + ((filters === null || filters === void 0 ? void 0 : filters.adult) || "hide");
|
||||
url += "&page=" + pageNo;
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(url)];
|
||||
case 1:
|
||||
result = _b.sent();
|
||||
return [4 /*yield*/, result.text()];
|
||||
case 2:
|
||||
body = _b.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
novels = [];
|
||||
loadedCheerio("#bookListBlock > div > div").each(function () {
|
||||
var _a, _b, _c;
|
||||
var name = (_a = loadedCheerio(this).find("div > h4 > a").text()) === null || _a === void 0 ? void 0 : _a.trim();
|
||||
var cover = (_b = loadedCheerio(this)
|
||||
.find("div > a > img")
|
||||
.attr("src")) === null || _b === void 0 ? void 0 : _b.trim();
|
||||
var url = (_c = loadedCheerio(this).find("div > h4 > a").attr("href")) === null || _c === void 0 ? void 0 : _c.trim();
|
||||
if (!name || !url)
|
||||
return;
|
||||
novels.push({ name: name, cover: cover, url: url });
|
||||
});
|
||||
return [2 /*return*/, novels];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
freedlit.prototype.parseNovelAndChapters = function (novelUrl) {
|
||||
var _a, _b;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var result, body, loadedCheerio, novel, chapters;
|
||||
return __generator(this, function (_c) {
|
||||
switch (_c.label) {
|
||||
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)(novelUrl)];
|
||||
case 1:
|
||||
result = _c.sent();
|
||||
return [4 /*yield*/, result.text()];
|
||||
case 2:
|
||||
body = _c.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
novel = {
|
||||
url: novelUrl,
|
||||
name: loadedCheerio(".book-info > h4").text(),
|
||||
cover: (_a = loadedCheerio(".book-cover > div > img").attr("src")) === null || _a === void 0 ? void 0 : _a.trim(),
|
||||
summary: (_b = loadedCheerio("#nav-home").text()) === null || _b === void 0 ? void 0 : _b.trim(),
|
||||
author: loadedCheerio(".book-info > h5 > a").text(),
|
||||
genres: loadedCheerio(".genre-list > a")
|
||||
.map(function (index, element) { return loadedCheerio(element).text(); })
|
||||
.get()
|
||||
.join(","),
|
||||
};
|
||||
chapters = [];
|
||||
loadedCheerio("#nav-contents > div").each(function () {
|
||||
var name = loadedCheerio(this).find("a").text();
|
||||
var releaseTime = loadedCheerio(this).find('span[class="date"]').text();
|
||||
var url = loadedCheerio(this).find("a").attr("href");
|
||||
if (!name || !url)
|
||||
return;
|
||||
chapters.push({ name: name, releaseTime: releaseTime, url: url });
|
||||
});
|
||||
novel.chapters = chapters;
|
||||
return [2 /*return*/, novel];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
freedlit.prototype.parseChapter = function (chapterUrl) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var result, body, loadedCheerio, chapterText;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)(chapterUrl)];
|
||||
case 1:
|
||||
result = _a.sent();
|
||||
return [4 /*yield*/, result.text()];
|
||||
case 2:
|
||||
body = _a.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
loadedCheerio('div[class="standart-block"]').remove();
|
||||
loadedCheerio('div[class="mobile-block"]').remove();
|
||||
chapterText = loadedCheerio('div[class="chapter"]').html();
|
||||
return [2 /*return*/, chapterText || ""];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
freedlit.prototype.searchNovels = function (searchTerm) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var url, result, body, loadedCheerio, novels;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
url = "".concat(this.site, "/search?query=").concat(searchTerm, "&type=all");
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(url)];
|
||||
case 1:
|
||||
result = _a.sent();
|
||||
return [4 /*yield*/, result.text()];
|
||||
case 2:
|
||||
body = _a.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
novels = [];
|
||||
loadedCheerio("#bookListBlock > div").each(function () {
|
||||
var _a, _b, _c;
|
||||
var name = (_a = loadedCheerio(this).find("h4 > a").text()) === null || _a === void 0 ? void 0 : _a.trim();
|
||||
var cover = (_b = loadedCheerio(this).find("a > img").attr("src")) === null || _b === void 0 ? void 0 : _b.trim();
|
||||
var url = (_c = loadedCheerio(this).find("h4 > a").attr("href")) === null || _c === void 0 ? void 0 : _c.trim();
|
||||
if (!name || !url)
|
||||
return;
|
||||
novels.push({ name: name, cover: cover, url: url });
|
||||
});
|
||||
return [2 /*return*/, novels];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
return freedlit;
|
||||
}());
|
||||
exports.default = new freedlit();
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,405 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var filterInputs_1 = require("@libs/filterInputs");
|
||||
var defaultCover_1 = require("@libs/defaultCover");
|
||||
var fetch_1 = require("@libs/fetch");
|
||||
var novelStatus_1 = require("@libs/novelStatus");
|
||||
var cheerio_1 = require("cheerio");
|
||||
var dayjs_1 = __importDefault(require("dayjs"));
|
||||
var apiUrl = "https://api.author.today/";
|
||||
var token = "Bearer guest";
|
||||
var AuthorToday = /** @class */ (function () {
|
||||
function AuthorToday() {
|
||||
this.id = "AT";
|
||||
this.name = "Автор Тудей";
|
||||
this.icon = "src/ru/authortoday/icon.png";
|
||||
this.site = "https://author.today";
|
||||
this.version = "1.0.0";
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.fetchImage = fetch_1.fetchFile;
|
||||
this.filters = [
|
||||
{
|
||||
key: "sort",
|
||||
label: "Сортировка",
|
||||
values: [
|
||||
{ label: "По популярности", value: "popular" },
|
||||
{ label: "По количеству лайков", value: "likes" },
|
||||
{ label: "По комментариям", value: "comments" },
|
||||
{ label: "По новизне", value: "recent" },
|
||||
{ label: "По просмотрам", value: "views" },
|
||||
{ label: "Набирающие популярность", value: "trending" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Picker,
|
||||
},
|
||||
{
|
||||
key: "genre",
|
||||
label: "Жанры",
|
||||
values: [
|
||||
{ label: "Альтернативная история", value: "sf-history" },
|
||||
{ label: "Антиутопия", value: "dystopia" },
|
||||
{ label: "Бизнес-литература", value: "biznes-literatura" },
|
||||
{ label: "Боевая фантастика", value: "sf-action" },
|
||||
{ label: "Боевик", value: "action" },
|
||||
{ label: "Боевое фэнтези", value: "fantasy-action" },
|
||||
{ label: "Бояръ-Аниме", value: "boyar-anime" },
|
||||
{ label: "Героическая фантастика", value: "sf-heroic" },
|
||||
{ label: "Героическое фэнтези", value: "heroic-fantasy" },
|
||||
{ label: "Городское фэнтези", value: "urban-fantasy" },
|
||||
{ label: "Детектив", value: "detective" },
|
||||
{ label: "Детская литература", value: "detskaya-literatura" },
|
||||
{ label: "Документальная проза", value: "non-fiction" },
|
||||
{ label: "Историческая проза", value: "historical-fiction" },
|
||||
{
|
||||
label: "Исторические приключения",
|
||||
value: "historical-adventure",
|
||||
},
|
||||
{ label: "Исторический детектив", value: "historical-mystery" },
|
||||
{
|
||||
label: "Исторический любовный роман",
|
||||
value: "historical-romance",
|
||||
},
|
||||
{ label: "Историческое фэнтези", value: "historical-fantasy" },
|
||||
{ label: "Киберпанк", value: "cyberpunk" },
|
||||
{ label: "Короткий любовный роман", value: "short-romance" },
|
||||
{ label: "Космическая фантастика", value: "sf-space" },
|
||||
{ label: "ЛитРПГ", value: "litrpg" },
|
||||
{ label: "Любовное фэнтези", value: "love-fantasy" },
|
||||
{ label: "Любовные романы", value: "romance" },
|
||||
{ label: "Мистика", value: "paranormal" },
|
||||
{ label: "Назад в СССР", value: "back-to-ussr" },
|
||||
{ label: "Научная фантастика", value: "science-fiction" },
|
||||
{ label: "Подростковая проза", value: "teen-prose" },
|
||||
{ label: "Политический роман", value: "political-fiction" },
|
||||
{ label: "Попаданцы", value: "popadantsy" },
|
||||
{ label: "Попаданцы в космос", value: "popadantsy-v-kosmos" },
|
||||
{
|
||||
label: "Попаданцы в магические миры",
|
||||
value: "popadantsy-v-magicheskie-miry",
|
||||
},
|
||||
{ label: "Попаданцы во времени", value: "popadantsy-vo-vremeni" },
|
||||
{ label: "Постапокалипсис", value: "postapocalyptic" },
|
||||
{ label: "Поэзия", value: "poetry" },
|
||||
{ label: "Приключения", value: "adventure" },
|
||||
{ label: "Публицистика", value: "publicism" },
|
||||
{ label: "Развитие личности", value: "razvitie-lichnosti" },
|
||||
{ label: "Разное", value: "other" },
|
||||
{ label: "РеалРПГ", value: "realrpg" },
|
||||
{ label: "Романтическая эротика", value: "romantic-erotika" },
|
||||
{ label: "Сказка", value: "fairy-tale" },
|
||||
{ label: "Современная проза", value: "modern-prose" },
|
||||
{
|
||||
label: "Современный любовный роман",
|
||||
value: "contemporary-romance",
|
||||
},
|
||||
{ label: "Социальная фантастика", value: "sf-social" },
|
||||
{ label: "Стимпанк", value: "steampunk" },
|
||||
{ label: "Темное фэнтези", value: "dark-fantasy" },
|
||||
{ label: "Триллер", value: "thriller" },
|
||||
{ label: "Ужасы", value: "horror" },
|
||||
{ label: "Фантастика", value: "sci-fi" },
|
||||
{
|
||||
label: "Фантастический детектив",
|
||||
value: "detective-science-fiction",
|
||||
},
|
||||
{ label: "Фанфик", value: "fanfiction" },
|
||||
{ label: "Фэнтези", value: "fantasy" },
|
||||
{ label: "Шпионский детектив", value: "spy-mystery" },
|
||||
{ label: "Эпическое фэнтези", value: "epic-fantasy" },
|
||||
{ label: "Эротика", value: "erotica" },
|
||||
{ label: "Эротическая фантастика", value: "sf-erotika" },
|
||||
{ label: "Эротический фанфик", value: "fanfiction-erotika" },
|
||||
{ label: "Эротическое фэнтези", value: "fantasy-erotika" },
|
||||
{ label: "Юмор", value: "humor" },
|
||||
{ label: "Юмористическая фантастика", value: "sf-humor" },
|
||||
{ label: "Юмористическое фэнтези", value: "ironical-fantasy" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Picker,
|
||||
},
|
||||
{
|
||||
key: "form",
|
||||
label: "Форма произведения",
|
||||
values: [
|
||||
{ label: "Любой", value: "any" },
|
||||
{ label: "Перевод", value: "translation" },
|
||||
{ label: "Повесть", value: "tale" },
|
||||
{ label: "Рассказ", value: "story" },
|
||||
{ label: "Роман", value: "novel" },
|
||||
{ label: "Сборник поэзии", value: "poetry" },
|
||||
{ label: "Сборник рассказов", value: "story-book" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Picker,
|
||||
},
|
||||
{
|
||||
key: "state",
|
||||
label: "Статус произведения",
|
||||
values: [
|
||||
{ label: "Любой статус", value: "any" },
|
||||
{ label: "В процессе", value: "in-progress" },
|
||||
{ label: "Завершено", value: "finished" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Picker,
|
||||
},
|
||||
{
|
||||
key: "series",
|
||||
label: "Статус цикла",
|
||||
values: [
|
||||
{ label: "Не важно", value: "any" },
|
||||
{ label: "Вне цикла", value: "out" },
|
||||
{ label: "Цикл завершен", value: "finished" },
|
||||
{ label: "Цикл не завершен", value: "unfinished" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Picker,
|
||||
},
|
||||
{
|
||||
key: "access",
|
||||
label: "Тип доступа",
|
||||
values: [
|
||||
{ label: "Любой", value: "any" },
|
||||
{ label: "Платный", value: "paid" },
|
||||
{ label: "Бесплатный", value: "free" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Picker,
|
||||
},
|
||||
{
|
||||
key: "promo",
|
||||
label: "Промо-фрагмент",
|
||||
values: [
|
||||
{ label: "Скрывать", value: "hide" },
|
||||
{ label: "Показывать", value: "show" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Picker,
|
||||
},
|
||||
];
|
||||
}
|
||||
AuthorToday.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b;
|
||||
var showLatestNovels = _a.showLatestNovels, filters = _a.filters;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var url, result, json, novels;
|
||||
var _this = this;
|
||||
return __generator(this, function (_c) {
|
||||
switch (_c.label) {
|
||||
case 0:
|
||||
url = apiUrl + "v1/catalog/search?page=" + pageNo;
|
||||
if (filters === null || filters === void 0 ? void 0 : filters.genre) {
|
||||
url += "&genre=" + filters.genre;
|
||||
}
|
||||
url +=
|
||||
"&sorting=" + (showLatestNovels ? "recent" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "popular");
|
||||
url += "&form=" + ((filters === null || filters === void 0 ? void 0 : filters.form) || "any");
|
||||
url += "&state=" + ((filters === null || filters === void 0 ? void 0 : filters.state) || "any");
|
||||
url += "&series=" + ((filters === null || filters === void 0 ? void 0 : filters.series) || "any");
|
||||
url += "&access=" + ((filters === null || filters === void 0 ? void 0 : filters.access) || "any");
|
||||
url += "&promo=" + ((filters === null || filters === void 0 ? void 0 : filters.promo) || "hide");
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, {
|
||||
headers: {
|
||||
Authorization: token,
|
||||
},
|
||||
})];
|
||||
case 1:
|
||||
result = _c.sent();
|
||||
return [4 /*yield*/, result.json()];
|
||||
case 2:
|
||||
json = (_c.sent());
|
||||
novels = [];
|
||||
if ((json === null || json === void 0 ? void 0 : json.code) === "NotFound") {
|
||||
return [2 /*return*/, novels];
|
||||
}
|
||||
(_b = json === null || json === void 0 ? void 0 : json.searchResults) === null || _b === void 0 ? void 0 : _b.forEach(function (novel) {
|
||||
return novels.push({
|
||||
name: novel.title,
|
||||
cover: (novel === null || novel === void 0 ? void 0 : novel.coverUrl)
|
||||
? "https://cm.author.today/content/" + novel.coverUrl
|
||||
: defaultCover_1.defaultCover,
|
||||
url: _this.site + "/work/" + novel.id,
|
||||
});
|
||||
});
|
||||
return [2 /*return*/, novels];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
AuthorToday.prototype.parseNovelAndChapters = function (novelUrl) {
|
||||
var _a;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var workID, result, json, novel, chaptersRaw, chaptersJSON, chapters;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
workID = novelUrl.split("/")[4];
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)("".concat(apiUrl, "v1/work/").concat(workID, "/details"), {
|
||||
headers: {
|
||||
Authorization: token,
|
||||
},
|
||||
})];
|
||||
case 1:
|
||||
result = _b.sent();
|
||||
return [4 /*yield*/, result.json()];
|
||||
case 2:
|
||||
json = (_b.sent());
|
||||
novel = {
|
||||
url: novelUrl,
|
||||
name: json.title,
|
||||
cover: (json === null || json === void 0 ? void 0 : json.coverUrl) ? json.coverUrl.split("?")[0] : defaultCover_1.defaultCover,
|
||||
author: (json === null || json === void 0 ? void 0 : json.originalAuthor) ||
|
||||
(json === null || json === void 0 ? void 0 : json.authorFIO) ||
|
||||
(json === null || json === void 0 ? void 0 : json.coAuthorFIO) ||
|
||||
(json === null || json === void 0 ? void 0 : json.secondCoAuthorFIO) ||
|
||||
(json === null || json === void 0 ? void 0 : json.translator) ||
|
||||
"",
|
||||
genres: (_a = json === null || json === void 0 ? void 0 : json.tags) === null || _a === void 0 ? void 0 : _a.join(", "),
|
||||
status: (json === null || json === void 0 ? void 0 : json.isFinished) ? novelStatus_1.NovelStatus.Completed : novelStatus_1.NovelStatus.Ongoing,
|
||||
};
|
||||
novel.summary = "";
|
||||
novel.summary += (json === null || json === void 0 ? void 0 : json.annotation) ? json.annotation + "\n" : "";
|
||||
novel.summary += (json === null || json === void 0 ? void 0 : json.authorNotes)
|
||||
? "Примечания автора:\n" + json.authorNotes
|
||||
: "";
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)("".concat(apiUrl, "v1/work/").concat(workID, "/content"), {
|
||||
headers: {
|
||||
Authorization: token,
|
||||
},
|
||||
})];
|
||||
case 3:
|
||||
chaptersRaw = _b.sent();
|
||||
return [4 /*yield*/, chaptersRaw.json()];
|
||||
case 4:
|
||||
chaptersJSON = (_b.sent());
|
||||
chapters = [];
|
||||
chaptersJSON === null || chaptersJSON === void 0 ? void 0 : chaptersJSON.forEach(function (chapter, index) {
|
||||
if ((chapter === null || chapter === void 0 ? void 0 : chapter.isAvailable) && !(chapter === null || chapter === void 0 ? void 0 : chapter.isDraft)) {
|
||||
chapters.push({
|
||||
name: (chapter === null || chapter === void 0 ? void 0 : chapter.title) || "\u0413\u043B\u0430\u0432\u0430 ".concat(index + 1),
|
||||
releaseTime: (0, dayjs_1.default)((chapter === null || chapter === void 0 ? void 0 : chapter.publishTime) || chapter.lastModificationTime).format("LLL"),
|
||||
url: "".concat(apiUrl, "v1/work/").concat(workID, "/chapter/").concat(chapter.id, "/text"),
|
||||
});
|
||||
}
|
||||
});
|
||||
novel.chapters = chapters;
|
||||
return [2 /*return*/, novel];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
AuthorToday.prototype.parseChapter = function (chapterUrl) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var result, json, key, text, i, loadedCheerio, baseUrl, chapterText;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)(chapterUrl, {
|
||||
headers: {
|
||||
Authorization: token,
|
||||
},
|
||||
})];
|
||||
case 1:
|
||||
result = _a.sent();
|
||||
return [4 /*yield*/, result.json()];
|
||||
case 2:
|
||||
json = (_a.sent());
|
||||
if (json === null || json === void 0 ? void 0 : json.code) {
|
||||
return [2 /*return*/, json.code + "\n" + (json === null || json === void 0 ? void 0 : json.message)];
|
||||
}
|
||||
key = json.key.split("").reverse().join("") + "@_@";
|
||||
text = "";
|
||||
for (i = 0; i < json.text.length; i++) {
|
||||
text += String.fromCharCode(json.text.charCodeAt(i) ^ key.charCodeAt(Math.floor(i % key.length)));
|
||||
}
|
||||
loadedCheerio = (0, cheerio_1.load)(text);
|
||||
baseUrl = this.site;
|
||||
loadedCheerio("img").each(function () {
|
||||
var _a;
|
||||
if (!((_a = loadedCheerio(this).attr("src")) === null || _a === void 0 ? void 0 : _a.startsWith("http"))) {
|
||||
var src = loadedCheerio(this).attr("src");
|
||||
loadedCheerio(this).attr("src", baseUrl + src);
|
||||
}
|
||||
});
|
||||
chapterText = loadedCheerio.html();
|
||||
return [2 /*return*/, chapterText];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
AuthorToday.prototype.searchNovels = function (searchTerm, pageNo) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var baseUrl, url, result, body, loadedCheerio, novels;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
baseUrl = this.site;
|
||||
url = baseUrl + "/search?category=works&q=" + searchTerm + "&page=";
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(url + (pageNo || 1))];
|
||||
case 1:
|
||||
result = _a.sent();
|
||||
return [4 /*yield*/, result.text()];
|
||||
case 2:
|
||||
body = _a.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
novels = [];
|
||||
loadedCheerio("div.book-row").each(function () {
|
||||
var _a;
|
||||
var name = loadedCheerio(this)
|
||||
.find('div[class="book-title"] a')
|
||||
.text()
|
||||
.trim();
|
||||
var cover = loadedCheerio(this).find("img").attr("src");
|
||||
var url = baseUrl +
|
||||
"/work/" +
|
||||
((_a = loadedCheerio(this)
|
||||
.find('div[class="book-title"] a')
|
||||
.attr("href")) === null || _a === void 0 ? void 0 : _a.split("/")[2]);
|
||||
if (cover) {
|
||||
cover = cover.split("?")[0];
|
||||
}
|
||||
else {
|
||||
cover = defaultCover_1.defaultCover;
|
||||
}
|
||||
novels.push({ name: name, cover: cover, url: url });
|
||||
});
|
||||
return [2 /*return*/, novels];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
return AuthorToday;
|
||||
}());
|
||||
exports.default = new AuthorToday();
|
||||
@@ -0,0 +1,300 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var filterInputs_1 = require("@libs/filterInputs");
|
||||
var fetch_1 = require("@libs/fetch");
|
||||
var novelStatus_1 = require("@libs/novelStatus");
|
||||
var cheerio_1 = require("cheerio");
|
||||
var dayjs_1 = __importDefault(require("dayjs"));
|
||||
var Bookriver = /** @class */ (function () {
|
||||
function Bookriver() {
|
||||
this.id = "bookriver";
|
||||
this.name = "Bookriver";
|
||||
this.site = "https://bookriver.ru";
|
||||
this.version = "1.0.0";
|
||||
this.icon = "src/ru/bookriver/icon.png";
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.fetchImage = fetch_1.fetchFile;
|
||||
this.filters = [
|
||||
{
|
||||
key: "sort",
|
||||
label: "Сортировка",
|
||||
values: [
|
||||
{ label: "Бестселлеры", value: "bestseller" },
|
||||
{ label: "Дате добавления", value: "newest" },
|
||||
{ label: "Дате обновления", value: "last-update" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Picker,
|
||||
},
|
||||
{
|
||||
key: "genres",
|
||||
label: "жанры",
|
||||
values: [
|
||||
{
|
||||
label: "Альтернативная история",
|
||||
value: "alternativnaya-istoriya",
|
||||
},
|
||||
{ label: "Боевая фантастика", value: "boevaya-fantastika" },
|
||||
{ label: "Боевое фэнтези", value: "boevoe-fentezi" },
|
||||
{ label: "Бытовое фэнтези", value: "bytovoe-fentezi" },
|
||||
{
|
||||
label: "Героическая фантастика",
|
||||
value: "geroicheskaya-fantastika",
|
||||
},
|
||||
{ label: "Героическое фэнтези", value: "geroicheskoe-fentezi" },
|
||||
{ label: "Городское фэнтези", value: "gorodskoe-fentezi" },
|
||||
{ label: "Детектив", value: "detektiv" },
|
||||
{
|
||||
label: "Детективная фантастика",
|
||||
value: "detektivnaya-fantastika",
|
||||
},
|
||||
{ label: "Жёсткая эротика", value: "zhyostkaya-erotika" },
|
||||
{ label: "Исторический детектив", value: "istoricheskii-detektiv" },
|
||||
{
|
||||
label: "Исторический любовный роман",
|
||||
value: "istoricheskii-lyubovnyi-roman",
|
||||
},
|
||||
{ label: "Историческое фэнтези", value: "istoricheskoe-fentezi" },
|
||||
{ label: "Киберпанк", value: "kiberpank" },
|
||||
{ label: "Классический детектив", value: "klassicheskii-detektiv" },
|
||||
{
|
||||
label: "Короткий любовный роман",
|
||||
value: "korotkii-lyubovnyi-roman",
|
||||
},
|
||||
{
|
||||
label: "Космическая фантастика",
|
||||
value: "kosmicheskaya-fantastika",
|
||||
},
|
||||
{ label: "Криминальный детектив", value: "kriminalnyi-detektiv" },
|
||||
{ label: "ЛитРПГ", value: "litrpg" },
|
||||
{ label: "Любовная фантастика", value: "lyubovnaya-fantastika" },
|
||||
{ label: "Любовное фэнтези", value: "lyubovnoe-fentezi" },
|
||||
{ label: "Любовный роман", value: "lyubovnyi-roman" },
|
||||
{ label: "Мистика", value: "mistika" },
|
||||
{ label: "Молодежная проза", value: "molodezhnaya-proza" },
|
||||
{ label: "Научная фантастика", value: "nauchnaya-fantastika" },
|
||||
{
|
||||
label: "Остросюжетный любовный роман",
|
||||
value: "ostrosyuzhetnyi-lyubovnyi-roman",
|
||||
},
|
||||
{ label: "Политический детектив", value: "politicheskii-detektiv" },
|
||||
{ label: "Попаданцы", value: "popadantsy" },
|
||||
{ label: "Постапокалипсис", value: "postapokalipsis" },
|
||||
{
|
||||
label: "Приключенческое фэнтези",
|
||||
value: "priklyuchencheskoe-fentezi",
|
||||
},
|
||||
{
|
||||
label: "Романтическая эротика",
|
||||
value: "romanticheskaya-erotika",
|
||||
},
|
||||
{ label: "С элементами эротики", value: "s-elementami-erotiki" },
|
||||
{ label: "Славянское фэнтези", value: "slavyanskoe-fentezi" },
|
||||
{
|
||||
label: "Современный любовный роман",
|
||||
value: "sovremennyi-lyubovnyi-roman",
|
||||
},
|
||||
{ label: "Социальная фантастика", value: "sotsialnaya-fantastika" },
|
||||
{ label: "Тёмное фэнтези", value: "temnoe-fentezi" },
|
||||
{ label: "Фантастика", value: "fantastika" },
|
||||
{ label: "Фэнтези", value: "fentezi" },
|
||||
{ label: "Шпионский детектив", value: "shpionskii-detektiv" },
|
||||
{ label: "Эпическое фэнтези", value: "epicheskoe-fentezi" },
|
||||
{ label: "Эротика", value: "erotika" },
|
||||
{
|
||||
label: "Эротическая фантастика",
|
||||
value: "eroticheskaya-fantastika",
|
||||
},
|
||||
{ label: "Эротический фанфик", value: "eroticheskii-fanfik" },
|
||||
{ label: "Эротическое фэнтези", value: "eroticheskoe-fentezi" },
|
||||
{
|
||||
label: "Юмористический детектив",
|
||||
value: "yumoristicheskii-detektiv",
|
||||
},
|
||||
{
|
||||
label: "Юмористическое фэнтези",
|
||||
value: "yumoristicheskoe-fentezi",
|
||||
},
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Checkbox,
|
||||
},
|
||||
];
|
||||
}
|
||||
Bookriver.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d;
|
||||
var showLatestNovels = _a.showLatestNovels, filters = _a.filters;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var url, result, body, loadedCheerio, novels, jsonRaw, json;
|
||||
var _this = this;
|
||||
return __generator(this, function (_e) {
|
||||
switch (_e.label) {
|
||||
case 0:
|
||||
url = this.site + "/genre?page=".concat(pageNo, "&perPage=24&sortingType=");
|
||||
url += showLatestNovels ? "last-update" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "bestseller";
|
||||
if (filters) {
|
||||
if (Array.isArray(filters.genres) && filters.genres.length) {
|
||||
url += "&g=" + filters.genres.join(",");
|
||||
}
|
||||
}
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(url)];
|
||||
case 1:
|
||||
result = _e.sent();
|
||||
return [4 /*yield*/, result.text()];
|
||||
case 2:
|
||||
body = _e.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
novels = [];
|
||||
jsonRaw = loadedCheerio("#__NEXT_DATA__").html();
|
||||
if (jsonRaw) {
|
||||
json = JSON.parse(jsonRaw);
|
||||
(_d = (_c = (_b = json.props.pageProps.state.pagesFilter) === null || _b === void 0 ? void 0 : _b.genre) === null || _c === void 0 ? void 0 : _c.books) === null || _d === void 0 ? void 0 : _d.forEach(function (novel) {
|
||||
return novels.push({
|
||||
name: novel.name,
|
||||
cover: novel.coverImages[0].url,
|
||||
url: _this.site + "/book/" + novel.slug,
|
||||
});
|
||||
});
|
||||
}
|
||||
return [2 /*return*/, novels];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
Bookriver.prototype.parseNovelAndChapters = function (novelUrl) {
|
||||
var _a, _b, _c, _d, _e;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var result, body, loadedCheerio, jsonRaw, json, book, novel, chapters;
|
||||
var _this = this;
|
||||
return __generator(this, function (_f) {
|
||||
switch (_f.label) {
|
||||
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)(novelUrl)];
|
||||
case 1:
|
||||
result = _f.sent();
|
||||
return [4 /*yield*/, result.text()];
|
||||
case 2:
|
||||
body = _f.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
jsonRaw = loadedCheerio("#__NEXT_DATA__").html();
|
||||
json = JSON.parse(jsonRaw || "{}");
|
||||
book = (_a = json.props.pageProps.state.book) === null || _a === void 0 ? void 0 : _a.bookPage;
|
||||
novel = {
|
||||
url: novelUrl,
|
||||
name: book === null || book === void 0 ? void 0 : book.name,
|
||||
cover: book === null || book === void 0 ? void 0 : book.coverImages[0].url,
|
||||
summary: book === null || book === void 0 ? void 0 : book.annotation,
|
||||
author: (_b = book === null || book === void 0 ? void 0 : book.author) === null || _b === void 0 ? void 0 : _b.name,
|
||||
genres: (_c = book === null || book === void 0 ? void 0 : book.tags) === null || _c === void 0 ? void 0 : _c.map(function (item) { return item.name; }).join(", "),
|
||||
status: (book === null || book === void 0 ? void 0 : book.statusComplete) === "writing"
|
||||
? novelStatus_1.NovelStatus.Ongoing
|
||||
: novelStatus_1.NovelStatus.Completed,
|
||||
};
|
||||
chapters = [];
|
||||
(_e = (_d = book === null || book === void 0 ? void 0 : book.ebook) === null || _d === void 0 ? void 0 : _d.chapters) === null || _e === void 0 ? void 0 : _e.forEach(function (chapter) {
|
||||
if (chapter.available) {
|
||||
chapters.push({
|
||||
name: chapter.name,
|
||||
releaseTime: (0, dayjs_1.default)((chapter === null || chapter === void 0 ? void 0 : chapter.firstPublishedAt) || chapter.createdAt).format("LLL"),
|
||||
url: _this.site + "/reader/" + (book === null || book === void 0 ? void 0 : book.slug) + "/" + chapter.chapterId,
|
||||
});
|
||||
}
|
||||
});
|
||||
novel.chapters = chapters;
|
||||
return [2 /*return*/, novel];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
Bookriver.prototype.parseChapter = function (chapterUrl) {
|
||||
var _a, _b;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var url, result, json, chapterText;
|
||||
return __generator(this, function (_c) {
|
||||
switch (_c.label) {
|
||||
case 0:
|
||||
url = "https://api.bookriver.ru/api/v1/books/chapter/text/";
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(url + chapterUrl.split("/").pop())];
|
||||
case 1:
|
||||
result = _c.sent();
|
||||
return [4 /*yield*/, result.json()];
|
||||
case 2:
|
||||
json = (_c.sent());
|
||||
chapterText = json.data.content || "Конец произведения";
|
||||
if ((_b = (_a = json.data) === null || _a === void 0 ? void 0 : _a.audio) === null || _b === void 0 ? void 0 : _b.available) {
|
||||
chapterText += "\n" + json.data.audio.url;
|
||||
}
|
||||
return [2 /*return*/, chapterText];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
Bookriver.prototype.searchNovels = function (searchTerm, pageNo) {
|
||||
var _a, _b;
|
||||
if (pageNo === void 0) { pageNo = 1; }
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var url, result, json, novels;
|
||||
var _this = this;
|
||||
return __generator(this, function (_c) {
|
||||
switch (_c.label) {
|
||||
case 0:
|
||||
url = "https://api.bookriver.ru/api/v1/search/autocomplete?keyword=".concat(searchTerm, "&page=").concat(pageNo, "&perPage=10");
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(url)];
|
||||
case 1:
|
||||
result = _c.sent();
|
||||
return [4 /*yield*/, result.json()];
|
||||
case 2:
|
||||
json = (_c.sent());
|
||||
novels = [];
|
||||
(_b = (_a = json === null || json === void 0 ? void 0 : json.data) === null || _a === void 0 ? void 0 : _a.books) === null || _b === void 0 ? void 0 : _b.forEach(function (novel) {
|
||||
return novels.push({
|
||||
name: novel.name,
|
||||
cover: novel.coverImages[0].url,
|
||||
url: _this.site + "/book/" + novel.slug,
|
||||
});
|
||||
});
|
||||
return [2 /*return*/, novels];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
return Bookriver;
|
||||
}());
|
||||
exports.default = new Bookriver();
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,374 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var filterInputs_1 = require("@libs/filterInputs");
|
||||
var fetch_1 = require("@libs/fetch");
|
||||
var novelStatus_1 = require("@libs/novelStatus");
|
||||
var cheerio_1 = require("cheerio");
|
||||
var Jaomix = /** @class */ (function () {
|
||||
function Jaomix() {
|
||||
this.id = "jaomix.ru";
|
||||
this.name = "Jaomix";
|
||||
this.site = "https://jaomix.ru";
|
||||
this.version = "1.0.0";
|
||||
this.icon = "src/ru/jaomix/icon.png";
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.fetchImage = fetch_1.fetchFile;
|
||||
this.filters = [
|
||||
{
|
||||
key: "sortby",
|
||||
label: "Сортировка:",
|
||||
values: [
|
||||
{ label: "Топ недели", value: "topweek" },
|
||||
{ label: "По алфавиту", value: "alphabet" },
|
||||
{ label: "По дате обновления", value: "upd" },
|
||||
{ label: "По дате создания", value: "new" },
|
||||
{ label: "По просмотрам", value: "count" },
|
||||
{ label: "Топ года", value: "topyear" },
|
||||
{ label: "Топ дня", value: "topday" },
|
||||
{ label: "Топ за все время", value: "alltime" },
|
||||
{ label: "Топ месяца", value: "topmonth" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Picker,
|
||||
},
|
||||
{
|
||||
key: "sortdaycreate",
|
||||
label: "Дата добавления:",
|
||||
values: [
|
||||
{ label: "Любое", value: "1" },
|
||||
{ label: "От 120 до 180 дней", value: "1218" },
|
||||
{ label: "От 180 до 365 дней", value: "1836" },
|
||||
{ label: "От 30 до 60 дней", value: "3060" },
|
||||
{ label: "От 365 дней", value: "365" },
|
||||
{ label: "От 60 до 90 дней", value: "6090" },
|
||||
{ label: "От 90 до 120 дней", value: "9012" },
|
||||
{ label: "Послед. 30 дней", value: "30" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Picker,
|
||||
},
|
||||
{
|
||||
key: "sortcountchapt",
|
||||
label: "Количество глав:",
|
||||
values: [
|
||||
{ label: "Любое кол-во глав", value: "1" },
|
||||
{ label: "До 500", value: "500" },
|
||||
{ label: "От 1000 до 2000", value: "1020" },
|
||||
{ label: "От 2000 до 3000", value: "2030" },
|
||||
{ label: "От 3000 до 4000", value: "3040" },
|
||||
{ label: "От 4000", value: "400" },
|
||||
{ label: "От 500 до 1000", value: "510" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Picker,
|
||||
},
|
||||
{
|
||||
key: "genre",
|
||||
label: "Жанры:",
|
||||
values: [
|
||||
{ label: "Боевые Искусства", value: "Боевые Искусства" },
|
||||
{ label: "Виртуальный Мир", value: "Виртуальный Мир" },
|
||||
{ label: "Гарем", value: "Гарем" },
|
||||
{ label: "Детектив", value: "Детектив" },
|
||||
{ label: "Драма", value: "Драма" },
|
||||
{ label: "Игра", value: "Игра" },
|
||||
{ label: "Истории из жизни", value: "Истории из жизни" },
|
||||
{ label: "Исторический", value: "Исторический" },
|
||||
{ label: "История", value: "История" },
|
||||
{ label: "Исэкай", value: "Исэкай" },
|
||||
{ label: "Комедия", value: "Комедия" },
|
||||
{ label: "Меха", value: "Меха" },
|
||||
{ label: "Мистика", value: "Мистика" },
|
||||
{ label: "Научная Фантастика", value: "Научная Фантастика" },
|
||||
{ label: "Повседневность", value: "Повседневность" },
|
||||
{ label: "Постапокалипсис", value: "Постапокалипсис" },
|
||||
{ label: "Приключения", value: "Приключения" },
|
||||
{ label: "Психология", value: "Психология" },
|
||||
{ label: "Романтика", value: "Романтика" },
|
||||
{ label: "Сверхъестественное", value: "Сверхъестественное" },
|
||||
{ label: "Сёнэн", value: "Сёнэн" },
|
||||
{ label: "Сёнэн-ай", value: "Сёнэн-ай" },
|
||||
{ label: "Спорт", value: "Спорт" },
|
||||
{ label: "Сэйнэн", value: "Сэйнэн" },
|
||||
{ label: "Сюаньхуа", value: "Сюаньхуа" },
|
||||
{ label: "Трагедия", value: "Трагедия" },
|
||||
{ label: "Триллер", value: "Триллер" },
|
||||
{ label: "Фантастика", value: "Фантастика" },
|
||||
{ label: "Фэнтези", value: "Фэнтези" },
|
||||
{ label: "Хоррор", value: "Хоррор" },
|
||||
{ label: "Школьная жизнь", value: "Школьная жизнь" },
|
||||
{ label: "Шоунен", value: "Шоунен" },
|
||||
{ label: "Экшн", value: "Экшн" },
|
||||
{ label: "Этти", value: "Этти" },
|
||||
{ label: "Юри", value: "Юри" },
|
||||
{ label: "Adult", value: "Adult" },
|
||||
{ label: "Ecchi", value: "Ecchi" },
|
||||
{ label: "Josei", value: "Josei" },
|
||||
{ label: "Lolicon", value: "Lolicon" },
|
||||
{ label: "Mature", value: "Mature" },
|
||||
{ label: "Shoujo", value: "Shoujo" },
|
||||
{ label: "Wuxia", value: "Wuxia" },
|
||||
{ label: "Xianxia", value: "Xianxia" },
|
||||
{ label: "Xuanhuan", value: "Xuanhuan" },
|
||||
{ label: "Yaoi", value: "Yaoi" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Checkbox,
|
||||
},
|
||||
{
|
||||
key: "delgenre",
|
||||
label: "Исключить жанры:",
|
||||
values: [
|
||||
{ label: "Боевые Искусства", value: "Боевые Искусства" },
|
||||
{ label: "Виртуальный Мир", value: "Виртуальный Мир" },
|
||||
{ label: "Гарем", value: "Гарем" },
|
||||
{ label: "Детектив", value: "Детектив" },
|
||||
{ label: "Драма", value: "Драма" },
|
||||
{ label: "Игра", value: "Игра" },
|
||||
{ label: "Истории из жизни", value: "Истории из жизни" },
|
||||
{ label: "Исторический", value: "Исторический" },
|
||||
{ label: "История", value: "История" },
|
||||
{ label: "Исэкай", value: "Исэкай" },
|
||||
{ label: "Комедия", value: "Комедия" },
|
||||
{ label: "Меха", value: "Меха" },
|
||||
{ label: "Мистика", value: "Мистика" },
|
||||
{ label: "Научная Фантастика", value: "Научная Фантастика" },
|
||||
{ label: "Повседневность", value: "Повседневность" },
|
||||
{ label: "Постапокалипсис", value: "Постапокалипсис" },
|
||||
{ label: "Приключения", value: "Приключения" },
|
||||
{ label: "Психология", value: "Психология" },
|
||||
{ label: "Романтика", value: "Романтика" },
|
||||
{ label: "Сверхъестественное", value: "Сверхъестественное" },
|
||||
{ label: "Сёнэн", value: "Сёнэн" },
|
||||
{ label: "Сёнэн-ай", value: "Сёнэн-ай" },
|
||||
{ label: "Спорт", value: "Спорт" },
|
||||
{ label: "Сэйнэн", value: "Сэйнэн" },
|
||||
{ label: "Сюаньхуа", value: "Сюаньхуа" },
|
||||
{ label: "Трагедия", value: "Трагедия" },
|
||||
{ label: "Триллер", value: "Триллер" },
|
||||
{ label: "Фантастика", value: "Фантастика" },
|
||||
{ label: "Фэнтези", value: "Фэнтези" },
|
||||
{ label: "Хоррор", value: "Хоррор" },
|
||||
{ label: "Школьная жизнь", value: "Школьная жизнь" },
|
||||
{ label: "Шоунен", value: "Шоунен" },
|
||||
{ label: "Экшн", value: "Экшн" },
|
||||
{ label: "Этти", value: "Этти" },
|
||||
{ label: "Юри", value: "Юри" },
|
||||
{ label: "Adult", value: "Adult" },
|
||||
{ label: "Ecchi", value: "Ecchi" },
|
||||
{ label: "Josei", value: "Josei" },
|
||||
{ label: "Lolicon", value: "Lolicon" },
|
||||
{ label: "Mature", value: "Mature" },
|
||||
{ label: "Shoujo", value: "Shoujo" },
|
||||
{ label: "Wuxia", value: "Wuxia" },
|
||||
{ label: "Xianxia", value: "Xianxia" },
|
||||
{ label: "Xuanhuan", value: "Xuanhuan" },
|
||||
{ label: "Yaoi", value: "Yaoi" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Checkbox,
|
||||
},
|
||||
{
|
||||
key: "lang",
|
||||
label: "Выбрать языки:",
|
||||
values: [
|
||||
{ label: "Английский", value: "Английский" },
|
||||
{ label: "Китайский", value: "Китайский" },
|
||||
{ label: "Корейский", value: "Корейский" },
|
||||
{ label: "Японский", value: "Японский" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Checkbox,
|
||||
},
|
||||
];
|
||||
}
|
||||
Jaomix.prototype.popularNovels = function (pageNo, _a) {
|
||||
var showLatestNovels = _a.showLatestNovels, filters = _a.filters;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var url, result, body, loadedCheerio, novels;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
url = this.site + "/?searchrn";
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.lang) instanceof Array) {
|
||||
url += filters.lang.map(function (lang, idx) { return "&lang[".concat(idx, "]=").concat(lang); }).join("");
|
||||
}
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genre) instanceof Array) {
|
||||
url += filters.genre
|
||||
.map(function (genre, idx) { return "&genre[".concat(idx, "]=").concat(genre); })
|
||||
.join("");
|
||||
}
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.delgenre) instanceof Array) {
|
||||
url += filters.delgenre
|
||||
.map(function (genre, idx) { return "&delgenre[".concat(idx, "]=del ").concat(genre); })
|
||||
.join("");
|
||||
}
|
||||
url += "&sortcountchapt=" + ((filters === null || filters === void 0 ? void 0 : filters.sortcountchapt) || "1");
|
||||
url += "&sortdaycreate=" + ((filters === null || filters === void 0 ? void 0 : filters.sortdaycreate) || "1");
|
||||
url +=
|
||||
"&sortby=" + (showLatestNovels ? "upd" : (filters === null || filters === void 0 ? void 0 : filters.sortby) || "topweek");
|
||||
url += "&gpage=" + pageNo;
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(url)];
|
||||
case 1:
|
||||
result = _b.sent();
|
||||
return [4 /*yield*/, result.text()];
|
||||
case 2:
|
||||
body = _b.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
novels = [];
|
||||
loadedCheerio('div[class="block-home"] > div[class="one"]').each(function () {
|
||||
var _a;
|
||||
var name = loadedCheerio(this)
|
||||
.find('div[class="img-home"] > a')
|
||||
.attr("title");
|
||||
var cover = (_a = loadedCheerio(this)
|
||||
.find('div[class="img-home"] > a > img')
|
||||
.attr("src")) === null || _a === void 0 ? void 0 : _a.replace("-150x150", "");
|
||||
var url = loadedCheerio(this)
|
||||
.find('div[class="img-home"] > a')
|
||||
.attr("href");
|
||||
if (!name || !url)
|
||||
return;
|
||||
novels.push({ name: name, cover: cover, url: url });
|
||||
});
|
||||
return [2 /*return*/, novels];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
Jaomix.prototype.parseNovelAndChapters = function (novelUrl) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var result, body, loadedCheerio, novel, chapters;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)(novelUrl)];
|
||||
case 1:
|
||||
result = _a.sent();
|
||||
return [4 /*yield*/, result.text()];
|
||||
case 2:
|
||||
body = _a.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
novel = {
|
||||
url: novelUrl,
|
||||
};
|
||||
novel.name = loadedCheerio('div[class="desc-book"] > h1').text().trim();
|
||||
novel.cover = loadedCheerio('div[class="img-book"] > img').attr("src");
|
||||
novel.summary = loadedCheerio('div[id="desc-tab"]').text().trim();
|
||||
loadedCheerio("#info-book > p").each(function () {
|
||||
var text = loadedCheerio(this).text().replace(/,/g, "").split(" ");
|
||||
if (text[0] === "Автор:") {
|
||||
novel.author = text.splice(1).join(" ");
|
||||
}
|
||||
else if (text[0] === "Жанры:") {
|
||||
novel.genres = text.splice(1).join(",");
|
||||
}
|
||||
else if (text[0] === "Статус:") {
|
||||
novel.status = text.includes("продолжается")
|
||||
? novelStatus_1.NovelStatus.Ongoing
|
||||
: novelStatus_1.NovelStatus.Completed;
|
||||
}
|
||||
});
|
||||
chapters = [];
|
||||
loadedCheerio(".download-chapter div.title").each(function () {
|
||||
var name = loadedCheerio(this).find("a").attr("title");
|
||||
var releaseTime = loadedCheerio(this).find("time").text();
|
||||
var url = loadedCheerio(this).find("a").attr("href");
|
||||
if (!name || !url)
|
||||
return;
|
||||
chapters.push({ name: name, releaseTime: releaseTime, url: url });
|
||||
});
|
||||
novel.chapters = chapters.reverse();
|
||||
return [2 /*return*/, novel];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
Jaomix.prototype.parseChapter = function (chapterUrl) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var result, body, loadedCheerio, chapterText;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)(chapterUrl)];
|
||||
case 1:
|
||||
result = _a.sent();
|
||||
return [4 /*yield*/, result.text()];
|
||||
case 2:
|
||||
body = _a.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
loadedCheerio('div[class="adblock-service"]').remove();
|
||||
chapterText = loadedCheerio('div[class="entry-content"]').html();
|
||||
return [2 /*return*/, chapterText || ""];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
Jaomix.prototype.searchNovels = function (searchTerm, pageNo) {
|
||||
if (pageNo === void 0) { pageNo = 1; }
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var url, result, body, loadedCheerio, novels;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
url = "".concat(this.site, "/?searchrn=").concat(searchTerm, "&but=\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044E&sortby=upd&gpage=").concat(pageNo);
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(url)];
|
||||
case 1:
|
||||
result = _a.sent();
|
||||
return [4 /*yield*/, result.text()];
|
||||
case 2:
|
||||
body = _a.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
novels = [];
|
||||
loadedCheerio('div[class="block-home"] > div[class="one"]').each(function () {
|
||||
var _a;
|
||||
var name = loadedCheerio(this)
|
||||
.find('div[class="img-home"] > a')
|
||||
.attr("title");
|
||||
var cover = (_a = loadedCheerio(this)
|
||||
.find('div[class="img-home"] > a > img')
|
||||
.attr("src")) === null || _a === void 0 ? void 0 : _a.replace("-150x150", "");
|
||||
var url = loadedCheerio(this)
|
||||
.find('div[class="img-home"] > a')
|
||||
.attr("href");
|
||||
if (!name || !url)
|
||||
return;
|
||||
novels.push({ name: name, cover: cover, url: url });
|
||||
});
|
||||
return [2 /*return*/, novels];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
return Jaomix;
|
||||
}());
|
||||
exports.default = new Jaomix();
|
||||
@@ -0,0 +1,940 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var filterInputs_1 = require("@libs/filterInputs");
|
||||
var defaultCover_1 = require("@libs/defaultCover");
|
||||
var fetch_1 = require("@libs/fetch");
|
||||
var novelStatus_1 = require("@libs/novelStatus");
|
||||
var cheerio_1 = require("cheerio");
|
||||
var dayjs_1 = __importDefault(require("dayjs"));
|
||||
var TL = /** @class */ (function () {
|
||||
function TL() {
|
||||
this.id = "TL";
|
||||
this.name = "NovelTL";
|
||||
this.site = "https://novel.tl";
|
||||
this.version = "1.0.0";
|
||||
this.icon = "src/ru/noveltl/icon.png";
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.fetchImage = fetch_1.fetchFile;
|
||||
this.filters = [
|
||||
{
|
||||
key: "tags",
|
||||
label: "Тэги",
|
||||
values: [
|
||||
{ label: "Автоматы", value: 64 },
|
||||
{ label: "Агрессивные персонажи", value: 26 },
|
||||
{ label: "Ад", value: 338 },
|
||||
{ label: "Адаптация манги", value: 8 },
|
||||
{ label: "Академия", value: 5 },
|
||||
{ label: "Актёрское искусство", value: 7 },
|
||||
{ label: "Актеры озвучки", value: 746 },
|
||||
{ label: "Алхимия", value: 27 },
|
||||
{ label: "Альтернативная реальность", value: 30 },
|
||||
{ label: "Амнезия", value: 31 },
|
||||
{ label: "Анабиоз", value: 170 },
|
||||
{ label: "Анал", value: 33 },
|
||||
{ label: "Ангелы", value: 38 },
|
||||
{ label: "Андроиды", value: 37 },
|
||||
{ label: "Анти-рост персонажа", value: 25 },
|
||||
{ label: "Антигерой", value: 43 },
|
||||
{ label: "Антикварный магазин", value: 44 },
|
||||
{ label: "Антимагия", value: 41 },
|
||||
{ label: "Антиутопия", value: 225 },
|
||||
{ label: "Апатичный главный герой", value: 46 },
|
||||
{ label: "Апокалипсис", value: 47 },
|
||||
{ label: "Аристократия", value: 51 },
|
||||
{ label: "Армия", value: 53 },
|
||||
{ label: "Артефакты", value: 58 },
|
||||
{ label: "Асоциальный главный герой", value: 42 },
|
||||
{ label: "Ассасины", value: 61 },
|
||||
{ label: "Атмосфера Европы", value: 245 },
|
||||
{ label: "Банды", value: 302 },
|
||||
{ label: "БДСМ", value: 77 },
|
||||
{ label: "Бедный главный герой", value: 541 },
|
||||
{ label: "Бездушный главный герой", value: 143 },
|
||||
{ label: "Беззаботный герой", value: 115 },
|
||||
{ label: "Безответная любовь", value: 213 },
|
||||
{ label: "Безответная любовь", value: 740 },
|
||||
{ label: "Безработные", value: 377 },
|
||||
{ label: "Беременность", value: 551 },
|
||||
{ label: "Бескорыстная любовь", value: 733 },
|
||||
{ label: "Бессмертные", value: 359 },
|
||||
{ label: "Бесстрашный главный герой", value: 274 },
|
||||
{ label: "Библиотека", value: 393 },
|
||||
{ label: "Биография", value: 86 },
|
||||
{ label: "Близнецы", value: 729 },
|
||||
{ label: "Богачи", value: 753 },
|
||||
{ label: "Боги", value: 318 },
|
||||
{ label: "Богини", value: 316 },
|
||||
{ label: "Богоподобный протагонист", value: 314 },
|
||||
{ label: "Боевая академия", value: 75 },
|
||||
{ label: "Боевая парочка", value: 547 },
|
||||
{ label: "Божественная защита", value: 208 },
|
||||
{ label: "Божественная сила", value: 317 },
|
||||
{ label: "Болеющие персонажи", value: 648 },
|
||||
{ label: "Борьба за власть", value: 548 },
|
||||
{ label: "Брак по расчету", value: 55 },
|
||||
{ label: "Братство", value: 106 },
|
||||
{ label: "Братья или сёстры", value: 646 },
|
||||
{ label: "Брошенные дети", value: 1 },
|
||||
{ label: "Бывший герой", value: 290 },
|
||||
{ label: "Вампиры", value: 742 },
|
||||
{ label: "Ваншот", value: 496 },
|
||||
{ label: "Вдали от родителей", value: 3 },
|
||||
{ label: "Ведьмы", value: 756 },
|
||||
{ label: "Везучий главный герой", value: 411 },
|
||||
{ label: "Верные подданные", value: 410 },
|
||||
{ label: "Вероломные герои/плетение интриг", value: 424 },
|
||||
{ label: "Взросление персонажа", value: 24 },
|
||||
{ label: "Видит то, чего остальной люд не в силах", value: 617 },
|
||||
{ label: "Виртуальная реальность", value: 744 },
|
||||
{ label: "Владелец магазина", value: 677 },
|
||||
{ label: "Владелец уникального оружия", value: 736 },
|
||||
{ label: "Властные персонажи", value: 545 },
|
||||
{ label: "Влияние прошлого", value: 517 },
|
||||
{ label: "Внезапное обогащение", value: 691 },
|
||||
{ label: "Внезапное обретение силы", value: 690 },
|
||||
{ label: "Военные хроники", value: 749 },
|
||||
{ label: "Возвращение в родной мир", value: 587 },
|
||||
{ label: "Война", value: 750 },
|
||||
{ label: "Вокалоид", value: 745 },
|
||||
{ label: "Волшебные твари", value: 413 },
|
||||
{ label: "Воскрешение", value: 586 },
|
||||
{ label: "Воспитанный главный герой", value: 537 },
|
||||
{ label: "Воспоминания прошлого", value: 283 },
|
||||
{ label: "Враги становятся союзниками", value: 238 },
|
||||
{ label: "Врата в иной мир", value: 303 },
|
||||
{ label: "Временной парадокс", value: 711 },
|
||||
{ label: "Вторжение на Землю", value: 228 },
|
||||
{ label: "Второй шанс", value: 608 },
|
||||
{ label: "Выживание", value: 695 },
|
||||
{ label: "Вынужденные условия проживания", value: 287 },
|
||||
{ label: "Высокомерный герой", value: 56 },
|
||||
{ label: "Гадание", value: 207 },
|
||||
{ label: "Галлюцинации", value: 189 },
|
||||
{ label: "Гарем рабов", value: 656 },
|
||||
{ label: "Геймеры", value: 301 },
|
||||
{ label: "Генетические модификации", value: 306 },
|
||||
{ label: "Герои", value: 341 },
|
||||
{ label: "Герои непонятного пола", value: 36 },
|
||||
{ label: "Героиня девушка-сорванец", value: 715 },
|
||||
{ label: "Героиня красавица", value: 81 },
|
||||
{ label: "Герой влюбляется первым", value: 561 },
|
||||
{ label: "Герой использует щит", value: 636 },
|
||||
{ label: "Герой красавец", value: 329 },
|
||||
{ label: "Герой со множеством тел", value: 564 },
|
||||
{ label: "Герой-бесстыдник", value: 632 },
|
||||
{ label: "Герой-извращенец", value: 521 },
|
||||
{ label: "Герой-трудяга", value: 330 },
|
||||
{ label: "Герой-яндере", value: 421 },
|
||||
{ label: "Гетерохромия", value: 342 },
|
||||
{ label: "Гильдии", value: 324 },
|
||||
{ label: "Гиперопека", value: 509 },
|
||||
{ label: "Главная героиня — женщина", value: 277 },
|
||||
{ label: "Главный герой - гений", value: 308 },
|
||||
{ label: "Главный герой - Моб", value: 446 },
|
||||
{ label: "Главный герой — знаменитость", value: 263 },
|
||||
{ label: "Главный герой — мужчина", value: 419 },
|
||||
{ label: "Главный герой в поисках гарема", value: 331 },
|
||||
{ label: "Главный герой заранее готовится", value: 557 },
|
||||
{ label: "Главный герой не человек", value: 488 },
|
||||
{ label: "Главный герой приёмный", value: 20 },
|
||||
{ label: "Главный герой сразу силён", value: 563 },
|
||||
{ label: "Гладиаторы", value: 310 },
|
||||
{ label: "Глухой к любви герой", value: 194 },
|
||||
{ label: "Гоблины", value: 313 },
|
||||
{ label: "Големы", value: 319 },
|
||||
{ label: "Гомункул", value: 347 },
|
||||
{ label: "Горничные", value: 418 },
|
||||
{ label: "Государственные интриги", value: 212 },
|
||||
{ label: "Гринд", value: 322 },
|
||||
{ label: "Давняя травма", value: 518 },
|
||||
{ label: "Двойник", value: 97 },
|
||||
{ label: "Дворецкие", value: 111 },
|
||||
{ label: "Дворфы", value: 224 },
|
||||
{ label: "Дворяне", value: 487 },
|
||||
{ label: "Двоюродные братья или сёстры", value: 162 },
|
||||
{ label: "Девочки-волшебницы", value: 415 },
|
||||
{ label: "Демоны", value: 193 },
|
||||
{ label: "Депрессия", value: 196 },
|
||||
{ label: "Детектив", value: 198 },
|
||||
{ label: "Детективное расследование", value: 473 },
|
||||
{ label: "Детское насилие", value: 125 },
|
||||
{ label: "Детское обещание", value: 130 },
|
||||
{ label: "Дискриминация", value: 203 },
|
||||
{ label: "Длительный разрыв отношений", value: 400 },
|
||||
{ label: "Домашняя жизнь", value: 45 },
|
||||
{ label: "Драконы", value: 218 },
|
||||
{ label: "Древний Китай", value: 34 },
|
||||
{ label: "Дружба", value: 293 },
|
||||
{ label: "Друзья детства", value: 128 },
|
||||
{ label: "Друзья становятся врагами", value: 292 },
|
||||
{ label: "Духи", value: 673 },
|
||||
{ label: "Духовная сила", value: 665 },
|
||||
{ label: "Духовный наставник", value: 671 },
|
||||
{ label: "Душещипательная история", value: 335 },
|
||||
{ label: "Души", value: 666 },
|
||||
{ label: "Дьявольский путь культивации", value: 192 },
|
||||
{ label: "Ёкай", value: 763 },
|
||||
{ label: "Есть аниме-адаптация", value: 10 },
|
||||
{ label: "Есть видеоигра", value: 13 },
|
||||
{ label: "Есть дорама-адаптация", value: 11 },
|
||||
{ label: "Есть манга-адаптация", value: 14 },
|
||||
{ label: "Есть манхва-адаптация", value: 16 },
|
||||
{ label: "Есть маньхуа-адаптация", value: 15 },
|
||||
{ label: "Есть фильм", value: 17 },
|
||||
{ label: "Есть CD дорама-адаптация", value: 12 },
|
||||
{ label: "Жёсткий главный герой", value: 597 },
|
||||
{ label: "Жестокие персонажи", value: 4 },
|
||||
{ label: "Жёстокие персонажи", value: 169 },
|
||||
{ label: "Животное-спутник", value: 78 },
|
||||
{ label: "Жизнь в одиночку", value: 396 },
|
||||
{ label: "Жрецы", value: 555 },
|
||||
{ label: "Жрицы", value: 554 },
|
||||
{ label: "Забота о детях", value: 127 },
|
||||
{ label: "Заботливый главный герой", value: 116 },
|
||||
{ label: "Загадочное заболевание", value: 471 },
|
||||
{ label: "Загадочное прошлое родителей", value: 470 },
|
||||
{ label: "Заговоры", value: 154 },
|
||||
{ label: "Закалка тела", value: 96 },
|
||||
{ label: "Закон джунглей", value: 682 },
|
||||
{ label: "Закулисная борба", value: 603 },
|
||||
{ label: "Замкнутый главный герой", value: 371 },
|
||||
{ label: "Запечатанная сила", value: 607 },
|
||||
{ label: "Затворник", value: 346 },
|
||||
{ label: "Звери", value: 80 },
|
||||
{ label: "Зверолюди", value: 39 },
|
||||
{ label: "Звероподобные", value: 79 },
|
||||
{ label: "Земледелие", value: 268 },
|
||||
{ label: "Злобные благородные девы", value: 743 },
|
||||
{ label: "Зловещие организации", value: 247 },
|
||||
{ label: "Злой главный герой", value: 248 },
|
||||
{ label: "Злые боги", value: 246 },
|
||||
{ label: "Злые религии", value: 249 },
|
||||
{ label: "Знаменитости", value: 118 },
|
||||
{ label: "Знания из прошлой жизни", value: 553 },
|
||||
{ label: "Зомби", value: 767 },
|
||||
{ label: "Игра на выживание", value: 696 },
|
||||
{ label: "Игровая рейтинговая система", value: 300 },
|
||||
{ label: "Из грязи в князи", value: 542 },
|
||||
{ label: "Известные родители", value: 262 },
|
||||
{ label: "Изменение внешнего вида", value: 48 },
|
||||
{ label: "Изнасилование", value: 574 },
|
||||
{ label: "Инвалидность", value: 202 },
|
||||
{ label: "Индустриализация", value: 364 },
|
||||
{ label: "Инженер", value: 241 },
|
||||
{ label: "Инцест", value: 361 },
|
||||
{ label: "Искажённая личность", value: 730 },
|
||||
{ label: "Искусственный интеллект", value: 59 },
|
||||
{ label: "Исполнение желаний", value: 755 },
|
||||
{ label: "Каннибализм", value: 113 },
|
||||
{ label: "Карточные игры", value: 114 },
|
||||
{ label: "Кладбищенский смотритель", value: 321 },
|
||||
{ label: "Классика", value: 134 },
|
||||
{ label: "Книги", value: 99 },
|
||||
{ label: "Книги навыков", value: 654 },
|
||||
{ label: "Книжный червь", value: 100 },
|
||||
{ label: "Коллеги", value: 140 },
|
||||
{ label: "Колледж/Университет", value: 145 },
|
||||
{ label: "Командная работа", value: 701 },
|
||||
{ label: "Комедийный подтекст", value: 147 },
|
||||
{ label: "Комплекс брата", value: 105 },
|
||||
{ label: "Комплекс неполноценности", value: 365 },
|
||||
{ label: "Контракты", value: 155 },
|
||||
{ label: "Контроль разума", value: 441 },
|
||||
{ label: "Конфликт в семье", value: 261 },
|
||||
{ label: "Конфликт верности", value: 153 },
|
||||
{ label: "Копейщик", value: 668 },
|
||||
{ label: "Королевская особа", value: 596 },
|
||||
{ label: "Королевства", value: 382 },
|
||||
{ label: "Короткий рассказ", value: 638 },
|
||||
{ label: "Коррупция", value: 157 },
|
||||
{ label: "Космические Войны", value: 158 },
|
||||
{ label: "Космос", value: 507 },
|
||||
{ label: "Косплей", value: 159 },
|
||||
{ label: "Кража способностей", value: 2 },
|
||||
{ label: "Крафтинг", value: 164 },
|
||||
{ label: "Кризис личности", value: 357 },
|
||||
{ label: "Кровь", value: 320 },
|
||||
{ label: "Кружки, клубы", value: 138 },
|
||||
{ label: "Кудэрэ", value: 384 },
|
||||
{ label: "Кузнец", value: 90 },
|
||||
{ label: "Кукловоды", value: 567 },
|
||||
{ label: "Куклы/Марионетки", value: 211 },
|
||||
{ label: "Кулинария", value: 156 },
|
||||
{ label: "Культивация", value: 171 },
|
||||
{ label: "Куннилингус", value: 172 },
|
||||
{ label: "Легенды", value: 391 },
|
||||
{ label: "Легкая жизнь", value: 229 },
|
||||
{ label: "Лекари", value: 334 },
|
||||
{ label: "Ленивый главный герой", value: 389 },
|
||||
{ label: "Лидерство", value: 390 },
|
||||
{ label: "Любит персонажа младше себя", value: 765 },
|
||||
{ label: "Любит персонажа старше себя", value: 494 },
|
||||
{ label: "Любовное соперничество", value: 406 },
|
||||
{ label: "Любовные треугольники", value: 407 },
|
||||
{ label: "Любовь детства", value: 129 },
|
||||
{ label: "Любовь с первого взгляда", value: 404 },
|
||||
{ label: "Любящие родители", value: 215 },
|
||||
{ label: "Маги", value: 757 },
|
||||
{ label: "Магические технологии", value: 417 },
|
||||
{ label: "Магия", value: 412 },
|
||||
{ label: "Магия призыва", value: 694 },
|
||||
{ label: "Маленькие девочки", value: 397 },
|
||||
{ label: "Мангака", value: 423 },
|
||||
{ label: "Маниакальная любовь", value: 492 },
|
||||
{ label: "Марти Сью", value: 508 },
|
||||
{ label: "Мастер подземелий", value: 222 },
|
||||
{ label: "Мастурбация", value: 432 },
|
||||
{ label: "Матриархат", value: 433 },
|
||||
{ label: "Межпространственные путешествия", value: 370 },
|
||||
{ label: "Менеджмент", value: 422 },
|
||||
{ label: "Месть", value: 588 },
|
||||
{ label: "Мечи и магия", value: 697 },
|
||||
{ label: "Мечники", value: 698 },
|
||||
{ label: "Миленькие дети", value: 176 },
|
||||
{ label: "Милитаризм", value: 439 },
|
||||
{ label: "Миловидная история", value: 178 },
|
||||
{ label: "Милый главный герой", value: 177 },
|
||||
{ label: "Минет", value: 275 },
|
||||
{ label: "Мировое древо", value: 760 },
|
||||
{ label: "Миролюбивый главный герой", value: 510 },
|
||||
{ label: "Мифология", value: 475 },
|
||||
{ label: "Младшие сёстры", value: 766 },
|
||||
{ label: "ММОРПГ", value: 445 },
|
||||
{ label: "Множество временных линий", value: 463 },
|
||||
{ label: "Модели", value: 447 },
|
||||
{ label: "Молод не по годам", value: 49 },
|
||||
{ label: "Монстры", value: 454 },
|
||||
{ label: "Мрачность", value: 183 },
|
||||
{ label: "Музыка", value: 466 },
|
||||
{ label: "Музыкальные группы", value: 68 },
|
||||
{ label: "Мутации", value: 468 },
|
||||
{ label: "На волосок от смерти", value: 479 },
|
||||
{ label: "На все руки мастер", value: 374 },
|
||||
{ label: "Навыки имеют стоимость", value: 150 },
|
||||
{ label: "Нагота", value: 490 },
|
||||
{ label: "Наездники на драконах", value: 216 },
|
||||
{ label: "Наёмники", value: 437 },
|
||||
{ label: "Наивный главный герой", value: 476 },
|
||||
{ label: "Наследие", value: 366 },
|
||||
{ label: "Настоящая любовь", value: 200 },
|
||||
{ label: "Настоящий гарем", value: 540 },
|
||||
{ label: "Небесное испытание", value: 337 },
|
||||
{ label: "Невезучий главный герой", value: 738 },
|
||||
{ label: "Недоверчивый протагонист", value: 206 },
|
||||
{ label: "Недооцененный главный герой", value: 734 },
|
||||
{ label: "Недопонимание", value: 444 },
|
||||
{ label: "Некромант", value: 480 },
|
||||
{ label: "Нелинейное повествование", value: 489 },
|
||||
{ label: "Неловкий главный герой", value: 67 },
|
||||
{ label: "Нелюбимый протагонист", value: 333 },
|
||||
{ label: "Немой персонаж", value: 469 },
|
||||
{ label: "Ненадежный рассказчик", value: 739 },
|
||||
{ label: "Непримечательный герой", value: 65 },
|
||||
{ label: "Нерешительный протагонист", value: 363 },
|
||||
{ label: "Несгибаемый главный герой", value: 676 },
|
||||
{ label: "Несколько главных героев", value: 460 },
|
||||
{ label: "Несколько миров", value: 461 },
|
||||
{ label: "Несколько перерожденцев", value: 462 },
|
||||
{ label: "Несколько попаданцев", value: 464 },
|
||||
{ label: "Несравненная скорость культивации", value: 269 },
|
||||
{ label: "Нехватка/отсутствие здравого смысла", value: 385 },
|
||||
{ label: "Нечестный протагонист", value: 205 },
|
||||
{ label: "НИИТ", value: 481 },
|
||||
{ label: "Ниндзя", value: 486 },
|
||||
{ label: "Обмен телами", value: 95 },
|
||||
{ label: "Оборотни", value: 754 },
|
||||
{ label: "Объект любви влюбился первым", value: 405 },
|
||||
{ label: "Объект любви популярен", value: 543 },
|
||||
{ label: "Огнестрельное оружие", value: 280 },
|
||||
{ label: "Ограничение на время жизни", value: 394 },
|
||||
{ label: "Одержимость", value: 544 },
|
||||
{ label: "Один родитель", value: 651 },
|
||||
{ label: "Одинокий главный герой", value: 399 },
|
||||
{ label: "Одиночество", value: 398 },
|
||||
{ label: "Одно тело на двоих", value: 634 },
|
||||
{ label: "Око силы", value: 253 },
|
||||
{ label: "Оммёдзи", value: 498 },
|
||||
{ label: "Организованная преступность", value: 500 },
|
||||
{ label: "Оргия", value: 501 },
|
||||
{ label: "Орки", value: 499 },
|
||||
{ label: "Основано на аниме", value: 74 },
|
||||
{ label: "Основано на видеоигре", value: 72 },
|
||||
{ label: "Основано на визуальной новелле", value: 73 },
|
||||
{ label: "Основано на песне", value: 70 },
|
||||
{ label: "Основано на фильме", value: 69 },
|
||||
{ label: "Осторожный главный герой", value: 117 },
|
||||
{ label: "От ненависти до любви один шаг", value: 239 },
|
||||
{ label: "От сильного с сильнейшему", value: 684 },
|
||||
{ label: "От слабого к сильному", value: 752 },
|
||||
{ label: "Отаку", value: 503 },
|
||||
{ label: "Отзывчивая любовь", value: 380 },
|
||||
{ label: "Отзывчивый главный герой", value: 339 },
|
||||
{ label: "Отношение учитель-ученик", value: 430 },
|
||||
{ label: "Отношения бог-человек", value: 315 },
|
||||
{ label: "Отношения между учителем и учеником", value: 687 },
|
||||
{ label: "Отношения начальник-подчинённый", value: 101 },
|
||||
{ label: "Отношения против воли", value: 286 },
|
||||
{ label: "Отношения с нечеловеком", value: 353 },
|
||||
{ label: "Отношения сэмпай-кохай", value: 621 },
|
||||
{ label: "Отношения хозяин-слуга", value: 431 },
|
||||
{ label: "Отомэ-игры", value: 504 },
|
||||
{ label: "ОТП", value: 562 },
|
||||
{ label: "Отшельники", value: 505 },
|
||||
{ label: "Офисный работник", value: 600 },
|
||||
{ label: "Официанты", value: 748 },
|
||||
{ label: "Охотники", value: 355 },
|
||||
{ label: "Падшие ангелы", value: 255 },
|
||||
{ label: "Падшие дворяне", value: 256 },
|
||||
{ label: "Пайзури", value: 511 },
|
||||
{ label: "Паразиты", value: 513 },
|
||||
{ label: "Параллельные миры", value: 512 },
|
||||
{ label: "Парк развлечений", value: 32 },
|
||||
{ label: "Пародия", value: 515 },
|
||||
{ label: "Перемещение между мирами", value: 758 },
|
||||
{ label: "Переодевание", value: 167 },
|
||||
{ label: "Переплавка пилюль", value: 529 },
|
||||
{ label: "Перерождение в девушку", value: 420 },
|
||||
{ label: "Перерождение в другом мире", value: 580 },
|
||||
{ label: "Перерождение в другом мире", value: 720 },
|
||||
{ label: "Перерождение в игровом мире", value: 579 },
|
||||
{ label: "Перерождение в монстра", value: 577 },
|
||||
{ label: "Персонажи с мазохистскими наклонностями", value: 429 },
|
||||
{ label: "Персонажи с садистскими наклонностями", value: 598 },
|
||||
{ label: "Петля времени", value: 709 },
|
||||
{ label: "Петтинг", value: 328 },
|
||||
{ label: "Писатели", value: 761 },
|
||||
{ label: "Питомцы", value: 522 },
|
||||
{ label: "Племенное общество", value: 726 },
|
||||
{ label: "Повелитель демонов", value: 191 },
|
||||
{ label: "Повествование от нескольких лиц", value: 459 },
|
||||
{ label: "Поглощение навыков", value: 653 },
|
||||
{ label: "Подземелья", value: 223 },
|
||||
{ label: "Поздно начинающаяся романтическая линия", value: 387 },
|
||||
{ label: "Политика", value: 538 },
|
||||
{ label: "Полулюди", value: 190 },
|
||||
{ label: "Помолвка", value: 240 },
|
||||
{ label: "Попаданец в другой мир", value: 723 },
|
||||
{ label: "Попаданец в игровой мир", value: 722 },
|
||||
{ label: "Постапокалипсис", value: 546 },
|
||||
{ label: "Постижение Дао", value: 181 },
|
||||
{ label: "Потеря девственности", value: 282 },
|
||||
{ label: "Потустороннее пространство", value: 416 },
|
||||
{ label: "Похищения", value: 379 },
|
||||
{ label: "Прагматичный главный герой", value: 549 },
|
||||
{ label: "Предательство", value: 83 },
|
||||
{ label: "Предвидение", value: 550 },
|
||||
{ label: "Преследователи", value: 674 },
|
||||
{ label: "Преступление", value: 165 },
|
||||
{ label: "Преступность", value: 166 },
|
||||
{ label: "Приёмные дети", value: 19 },
|
||||
{ label: "Призванный герой", value: 693 },
|
||||
{ label: "Призраки", value: 309 },
|
||||
{ label: "Приключения", value: 22 },
|
||||
{ label: "Принуждение", value: 108 },
|
||||
{ label: "Приручатель", value: 453 },
|
||||
{ label: "Прислуга", value: 625 },
|
||||
{ label: "Приставучий любовник", value: 136 },
|
||||
{ label: "Притворная любовь", value: 552 },
|
||||
{ label: "Пришельцы", value: 28 },
|
||||
{ label: "Программист", value: 558 },
|
||||
{ label: "Произведение - обладатель наград", value: 66 },
|
||||
{ label: "Проклятия", value: 175 },
|
||||
{ label: "Промывка мозгов", value: 102 },
|
||||
{ label: "Пропуск времени", value: 712 },
|
||||
{ label: "Пророчества", value: 559 },
|
||||
{ label: "Протагонист в очках", value: 312 },
|
||||
{ label: "Протагонист раб", value: 657 },
|
||||
{ label: "Психокинез", value: 565 },
|
||||
{ label: "Психопаты", value: 566 },
|
||||
{ label: "Путешествия", value: 759 },
|
||||
{ label: "Путешествия во времени", value: 713 },
|
||||
{ label: "Пытки", value: 716 },
|
||||
{ label: "Рабы", value: 658 },
|
||||
{ label: "Развитие отношений", value: 160 },
|
||||
{ label: "Развитие персонажа", value: 119 },
|
||||
{ label: "Раздвоение личности", value: 458 },
|
||||
{ label: "Размеренная романтика", value: 661 },
|
||||
{ label: "Разница в статусе", value: 201 },
|
||||
{ label: "Разорванная помолвка", value: 104 },
|
||||
{ label: "Разумные предметы", value: 622 },
|
||||
{ label: "Рай", value: 336 },
|
||||
{ label: "Раняя романтика", value: 227 },
|
||||
{ label: "Расизм", value: 573 },
|
||||
{ label: "Расследования", value: 372 },
|
||||
{ label: "Ребенок — главный герой", value: 126 },
|
||||
{ label: "Реверс-гарем", value: 589 },
|
||||
{ label: "Реверс-изнасилование", value: 590 },
|
||||
{ label: "Резкая смена характера", value: 520 },
|
||||
{ label: "Реинкарнация", value: 581 },
|
||||
{ label: "Религии", value: 582 },
|
||||
{ label: "Ресторан", value: 585 },
|
||||
{ label: "Решительный главный герой", value: 199 },
|
||||
{ label: "Робкий протагонист", value: 714 },
|
||||
{ label: "Родительсткий комплекс", value: 514 },
|
||||
{ label: "Родные не связанные кровью", value: 647 },
|
||||
{ label: "Родословные", value: 94 },
|
||||
{ label: "РПГ-система", value: 392 },
|
||||
{ label: "Рыцари", value: 383 },
|
||||
{ label: "Самовлюбленный главный герой", value: 477 },
|
||||
{ label: "Самоубийства", value: 692 },
|
||||
{ label: "Самураи", value: 601 },
|
||||
{ label: "Сборник коротких историй", value: 144 },
|
||||
{ label: "Свадьба", value: 426 },
|
||||
{ label: "Связанные сюжетные линии", value: 369 },
|
||||
{ label: "Святые", value: 599 },
|
||||
{ label: "Секреты", value: 614 },
|
||||
{ label: "Секс втроём", value: 707 },
|
||||
{ label: "Секс-рабыня", value: 629 },
|
||||
{ label: "Семейная любовь", value: 257 },
|
||||
{ label: "Семь добродетелей", value: 627 },
|
||||
{ label: "Семь смертных грехов", value: 626 },
|
||||
{ label: "Серийные убийцы", value: 624 },
|
||||
{ label: "Сикигами", value: 637 },
|
||||
{ label: "Сильная любовь от старших", value: 214 },
|
||||
{ label: "Синдром восьмиклассника", value: 132 },
|
||||
{ label: "Синдром сестры", value: 652 },
|
||||
{ label: "Сироты", value: 502 },
|
||||
{ label: "Системный администратор", value: 699 },
|
||||
{ label: "Скромный главный герой", value: 409 },
|
||||
{ label: "Скрытые романтические отношения", value: 23 },
|
||||
{ label: "Скрытые способности", value: 343 },
|
||||
{ label: "Скряга", value: 450 },
|
||||
{ label: "Скульпторы", value: 606 },
|
||||
{ label: "Слабая романтика", value: 688 },
|
||||
{ label: "Слабый главный герой", value: 751 },
|
||||
{ label: "Сложные семейные отношения", value: 149 },
|
||||
{ label: "Смена расы", value: 572 },
|
||||
{ label: "Смертельное заболевание", value: 704 },
|
||||
{ label: "Смерть", value: 185 },
|
||||
{ label: "Смерть любимых", value: 186 },
|
||||
{ label: "Современность", value: 448 },
|
||||
{ label: "Современные знания в слаборазвитых мирах", value: 449 },
|
||||
{ label: "Сожительство", value: 141 },
|
||||
{ label: "Создание артефактов", value: 57 },
|
||||
{ label: "Создание клана", value: 133 },
|
||||
{ label: "Создание королевства", value: 381 },
|
||||
{ label: "Создание навыков", value: 655 },
|
||||
{ label: "Сокрытие истинных способностей", value: 344 },
|
||||
{ label: "Сокрытие личности", value: 345 },
|
||||
{ label: "Солдаты", value: 664 },
|
||||
{ label: "Сон", value: 659 },
|
||||
{ label: "Соседи по комнате", value: 595 },
|
||||
{ label: "Социальные изгои", value: 663 },
|
||||
{ label: "Спасение мира", value: 602 },
|
||||
{ label: "Спорящая пара", value: 84 },
|
||||
{ label: "Способность перевоплощения", value: 719 },
|
||||
{ label: "Средневековье", value: 436 },
|
||||
{ label: "Стеснительные персонажи", value: 643 },
|
||||
{ label: "Стокгольмский синдром", value: 575 },
|
||||
{ label: "Стокгольмский синдром", value: 675 },
|
||||
{ label: "Стратег", value: 681 },
|
||||
{ label: "Стратегические битвы", value: 680 },
|
||||
{ label: "Стрелки", value: 325 },
|
||||
{ label: "Стрельба из лука", value: 50 },
|
||||
{ label: "Студенческий совет", value: 686 },
|
||||
{ label: "Судьба", value: 197 },
|
||||
{ label: "Суккубы", value: 689 },
|
||||
{ label: "Суперспособности", value: 669 },
|
||||
{ label: "Суровая тренировка", value: 332 },
|
||||
{ label: "Сцены насилия", value: 195 },
|
||||
{ label: "Таинственное прошлое", value: 472 },
|
||||
{ label: "Тайная личность", value: 610 },
|
||||
{ label: "Тайные организации", value: 611 },
|
||||
{ label: "Телохранители", value: 98 },
|
||||
{ label: "Тентакли", value: 703 },
|
||||
{ label: "Террористы", value: 705 },
|
||||
{ label: "Технологический разрыв", value: 702 },
|
||||
{ label: "Тихие герои", value: 568 },
|
||||
{ label: "Толстый протагонист", value: 271 },
|
||||
{ label: "Торговцы", value: 438 },
|
||||
{ label: "Травник", value: 340 },
|
||||
{ label: "Трагичное прошлое", value: 718 },
|
||||
{ label: "Трап", value: 725 },
|
||||
{ label: "Триллер", value: 708 },
|
||||
{ label: "Турнир", value: 76 },
|
||||
{ label: "Тюрьма", value: 556 },
|
||||
{ label: "Убийства", value: 465 },
|
||||
{ label: "Уверенный в себе главный герой", value: 151 },
|
||||
{ label: "Умная пара", value: 662 },
|
||||
{ label: "Умный главный герой", value: 135 },
|
||||
{ label: "Уникальная техника культивации", value: 735 },
|
||||
{ label: "Уникальные оружия", value: 737 },
|
||||
{ label: "Управление бизнесом", value: 109 },
|
||||
{ label: "Управление временем", value: 710 },
|
||||
{ label: "Управление пространством", value: 667 },
|
||||
{ label: "Ускоренный рост", value: 6 },
|
||||
{ label: "Учёные", value: 605 },
|
||||
{ label: "Учителя", value: 700 },
|
||||
{ label: "Фамильяры", value: 258 },
|
||||
{ label: "Фанатизм", value: 264 },
|
||||
{ label: "Фармацевт", value: 523 },
|
||||
{ label: "Феи", value: 254 },
|
||||
{ label: "Фениксы", value: 526 },
|
||||
{ label: "Фетиш на грудь", value: 103 },
|
||||
{ label: "Фетиш на очки", value: 311 },
|
||||
{ label: "Философия", value: 524 },
|
||||
{ label: "Фобии/Страхи", value: 525 },
|
||||
{ label: "Фольклор", value: 285 },
|
||||
{ label: "Формирование армии", value: 54 },
|
||||
{ label: "Футанари", value: 295 },
|
||||
{ label: "Футуристический мир", value: 296 },
|
||||
{ label: "Фэнтези", value: 267 },
|
||||
{ label: "Фэнтезийные существа", value: 266 },
|
||||
{ label: "Хакеры", value: 326 },
|
||||
{ label: "Харизматичный протагонист", value: 120 },
|
||||
{ label: "Хитрый главный герой", value: 173 },
|
||||
{ label: "Хладнокровный главный герой", value: 112 },
|
||||
{ label: "Художники", value: 60 },
|
||||
{ label: "Хулиганы", value: 188 },
|
||||
{ label: "Цундере", value: 728 },
|
||||
{ label: "Чат", value: 122 },
|
||||
{ label: "Человек-оружие", value: 352 },
|
||||
{ label: "Человекоподобный главный герой", value: 354 },
|
||||
{ label: "Честный главный герой", value: 348 },
|
||||
{ label: "Четкие любовные убеждения", value: 683 },
|
||||
{ label: "Читы", value: 123 },
|
||||
{ label: "Чудаковатые герои", value: 569 },
|
||||
{ label: "Чужие воспоминания", value: 721 },
|
||||
{ label: "Шантаж", value: 89 },
|
||||
{ label: "Шеф-повар", value: 124 },
|
||||
{ label: "Школа для девочек", value: 29 },
|
||||
{ label: "Шоу-бизнес", value: 642 },
|
||||
{ label: "Шпионы", value: 670 },
|
||||
{ label: "Эволюция", value: 250 },
|
||||
{ label: "Эгоистичный главный герой", value: 618 },
|
||||
{ label: "Экзорцизм", value: 252 },
|
||||
{ label: "Экономика", value: 230 },
|
||||
{ label: "Эксгибиционизм", value: 251 },
|
||||
{ label: "Эксперименты на людях", value: 351 },
|
||||
{ label: "Элементальная магия", value: 234 },
|
||||
{ label: "Элементы игрового мира", value: 299 },
|
||||
{ label: "Элементы романтики", value: 594 },
|
||||
{ label: "Элементы юри", value: 640 },
|
||||
{ label: "Элементы яоя", value: 641 },
|
||||
{ label: "Эльфы", value: 235 },
|
||||
{ label: "Эпизодичность", value: 243 },
|
||||
{ label: "Язвительные персонажи", value: 635 },
|
||||
{ label: "Языковой барьер", value: 386 },
|
||||
{ label: "Яндере", value: 762 },
|
||||
{ label: "Яойщица", value: 294 },
|
||||
{ label: "Японские силы самообороны", value: 378 },
|
||||
{ label: "R-15", value: 570 },
|
||||
{ label: "R-18", value: 571 },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Checkbox,
|
||||
},
|
||||
{
|
||||
key: "genres",
|
||||
label: "Жанры",
|
||||
values: [
|
||||
{ label: "16+", value: 1 },
|
||||
{ label: "18+", value: 2 },
|
||||
{ label: "Боевик", value: 3 },
|
||||
{ label: "Боевые искусства", value: 4 },
|
||||
{ label: "Вампиры", value: 47 },
|
||||
{ label: "Военное", value: 44 },
|
||||
{ label: "Гарем", value: 5 },
|
||||
{ label: "Демоны", value: 48 },
|
||||
{ label: "Детектив", value: 6 },
|
||||
{ label: "Дзёсей", value: 50 },
|
||||
{ label: "Драма", value: 7 },
|
||||
{ label: "Игры", value: 45 },
|
||||
{ label: "Историческое", value: 8 },
|
||||
{ label: "Киберпанк", value: 9 },
|
||||
{ label: "Комедия", value: 10 },
|
||||
{ label: "Космос", value: 46 },
|
||||
{ label: "Магия", value: 42 },
|
||||
{ label: "Махо-сёдзё", value: 12 },
|
||||
{ label: "Меха", value: 13 },
|
||||
{ label: "Мистика", value: 14 },
|
||||
{ label: "Музыка", value: 49 },
|
||||
{ label: "Научная фантастика", value: 15 },
|
||||
{ label: "Пародия", value: 16 },
|
||||
{ label: "Повседневность", value: 17 },
|
||||
{ label: "Приключения", value: 18 },
|
||||
{ label: "Психологическое", value: 19 },
|
||||
{ label: "Романтика", value: 20 },
|
||||
{ label: "Сверхъестественное", value: 21 },
|
||||
{ label: "Сёдзё", value: 22 },
|
||||
{ label: "Сёдзё-ай", value: 23 },
|
||||
{ label: "Сёнэн", value: 24 },
|
||||
{ label: "Сёнэн-ай", value: 25 },
|
||||
{ label: "Смена пола", value: 26 },
|
||||
{ label: "Современность", value: 27 },
|
||||
{ label: "Спорт", value: 28 },
|
||||
{ label: "Супер сила", value: 43 },
|
||||
{ label: "Сэйнэн", value: 29 },
|
||||
{ label: "Трагедия", value: 32 },
|
||||
{ label: "Триллер", value: 33 },
|
||||
{ label: "Ужасы", value: 34 },
|
||||
{ label: "Уся", value: 35 },
|
||||
{ label: "Фэнтези", value: 36 },
|
||||
{ label: "Школьная жизнь", value: 37 },
|
||||
{ label: "Этти", value: 38 },
|
||||
{ label: "Юри", value: 39 },
|
||||
{ label: "Яой", value: 40 },
|
||||
{ label: "LitRPG", value: 41 },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Checkbox,
|
||||
},
|
||||
];
|
||||
}
|
||||
TL.prototype.popularNovels = function (page, _a) {
|
||||
var _b, _c, _d;
|
||||
var showLatestNovels = _a.showLatestNovels, filters = _a.filters;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var result, json, novels;
|
||||
var _this = this;
|
||||
return __generator(this, function (_e) {
|
||||
switch (_e.label) {
|
||||
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)(this.site + "/api/site/v2/graphql", {
|
||||
method: "post",
|
||||
headers: {
|
||||
Accept: "application/json, text/plain, */*",
|
||||
"Accept-Language": "ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3",
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
referrer: this.site,
|
||||
body: JSON.stringify({
|
||||
operationName: "Projects",
|
||||
query: "query Projects($hostname:String! $filter:SearchFilter $page:Int $limit:Int){projects(section:{fullUrl:$hostname}filter:$filter page:{pageSize:$limit,pageNumber:$page}){content{title fullUrl covers{url}}}}",
|
||||
variables: {
|
||||
filter: {
|
||||
tags: (filters === null || filters === void 0 ? void 0 : filters.tags) || [],
|
||||
genres: (filters === null || filters === void 0 ? void 0 : filters.genres) || [],
|
||||
},
|
||||
hostname: "novel.tl",
|
||||
limit: 40,
|
||||
page: page,
|
||||
},
|
||||
}),
|
||||
})];
|
||||
case 1:
|
||||
result = _e.sent();
|
||||
return [4 /*yield*/, result.json()];
|
||||
case 2:
|
||||
json = (_e.sent());
|
||||
novels = [];
|
||||
(_d = (_c = (_b = json.data) === null || _b === void 0 ? void 0 : _b.projects) === null || _c === void 0 ? void 0 : _c.content) === null || _d === void 0 ? void 0 : _d.forEach(function (novel) {
|
||||
var _a, _b;
|
||||
return novels.push({
|
||||
name: novel.title,
|
||||
url: "https://" + novel.fullUrl,
|
||||
cover: ((_b = (_a = novel === null || novel === void 0 ? void 0 : novel.covers) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url)
|
||||
? _this.site + novel.covers[0].url
|
||||
: defaultCover_1.defaultCover,
|
||||
});
|
||||
});
|
||||
return [2 /*return*/, novels];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
TL.prototype.parseNovelAndChapters = function (novelUrl) {
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var result, json, novel, genres, chapters;
|
||||
return __generator(this, function (_q) {
|
||||
switch (_q.label) {
|
||||
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)(this.site + "/api/site/v2/graphql", {
|
||||
method: "post",
|
||||
headers: {
|
||||
Accept: "application/json, text/plain, */*",
|
||||
"Accept-Language": "ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3",
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
referrer: this.site,
|
||||
body: JSON.stringify({
|
||||
operationName: "Book",
|
||||
query: 'query Book($url:String){project(project:{fullUrl:$url}){title translationStatus fullUrl covers{url}persons(langs:["ru","en","*"],roles:["author","illustrator"]){role name{firstName lastName}}genres{nameRu nameEng}tags{nameRu nameEng}annotation{text}subprojects{content{title volumes{content{shortName chapters{title publishDate fullUrl published}}}}}}}',
|
||||
variables: {
|
||||
url: novelUrl,
|
||||
},
|
||||
}),
|
||||
})];
|
||||
case 1:
|
||||
result = _q.sent();
|
||||
return [4 /*yield*/, result.json()];
|
||||
case 2:
|
||||
json = (_q.sent());
|
||||
novel = {
|
||||
url: novelUrl,
|
||||
name: (_a = json.data.project) === null || _a === void 0 ? void 0 : _a.title,
|
||||
cover: ((_d = (_c = (_b = json.data.project) === null || _b === void 0 ? void 0 : _b.covers) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.url)
|
||||
? this.site + json.data.project.covers[0].url
|
||||
: defaultCover_1.defaultCover,
|
||||
summary: (_f = (_e = json.data.project) === null || _e === void 0 ? void 0 : _e.annotation) === null || _f === void 0 ? void 0 : _f.text,
|
||||
status: ((_g = json.data.project) === null || _g === void 0 ? void 0 : _g.translationStatus) === "active"
|
||||
? novelStatus_1.NovelStatus.Ongoing
|
||||
: novelStatus_1.NovelStatus.Completed,
|
||||
};
|
||||
genres = [(_h = json.data.project) === null || _h === void 0 ? void 0 : _h.tags, (_j = json.data.project) === null || _j === void 0 ? void 0 : _j.genres]
|
||||
.flat()
|
||||
.map(function (item) { return (item === null || item === void 0 ? void 0 : item.nameRu) || (item === null || item === void 0 ? void 0 : item.nameEng); })
|
||||
.filter(function (item) { return item; });
|
||||
if (genres === null || genres === void 0 ? void 0 : genres.length) {
|
||||
novel.genres = genres.join(", ");
|
||||
}
|
||||
(_l = (_k = json.data.project) === null || _k === void 0 ? void 0 : _k.persons) === null || _l === void 0 ? void 0 : _l.forEach(function (person) {
|
||||
var _a;
|
||||
if (person.role == "author" && person.name.firstName) {
|
||||
novel.author =
|
||||
person.name.firstName + " " + (((_a = person.name) === null || _a === void 0 ? void 0 : _a.lastName) || "");
|
||||
}
|
||||
});
|
||||
chapters = [];
|
||||
(_p = (_o = (_m = json.data.project) === null || _m === void 0 ? void 0 : _m.subprojects) === null || _o === void 0 ? void 0 : _o.content) === null || _p === void 0 ? void 0 : _p.forEach(function (work) {
|
||||
return work.volumes.content.forEach(function (volume) {
|
||||
return volume.chapters.forEach(function (chapter) {
|
||||
return (chapter === null || chapter === void 0 ? void 0 : chapter.published) &&
|
||||
chapters.push({
|
||||
name: volume.shortName + " " + chapter.title,
|
||||
url: "https://" + chapter.fullUrl,
|
||||
releaseTime: (0, dayjs_1.default)(chapter.publishDate).format("LLL"),
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
novel.chapters = chapters;
|
||||
return [2 /*return*/, novel];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
TL.prototype.parseChapter = function (chapterUrl) {
|
||||
var _a, _b;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var result, json, baseUrl, loadedCheerio, chapterText;
|
||||
return __generator(this, function (_c) {
|
||||
switch (_c.label) {
|
||||
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)(this.site + "/api/site/v2/graphql", {
|
||||
method: "post",
|
||||
headers: {
|
||||
Accept: "application/json, text/plain, */*",
|
||||
"Accept-Language": "ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3",
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
referrer: this.site,
|
||||
body: JSON.stringify({
|
||||
query: "query($url:String){chapter(chapter:{fullUrl:$url}){text{text}}}",
|
||||
variables: {
|
||||
url: chapterUrl,
|
||||
},
|
||||
}),
|
||||
})];
|
||||
case 1:
|
||||
result = _c.sent();
|
||||
return [4 /*yield*/, result.json()];
|
||||
case 2:
|
||||
json = (_c.sent());
|
||||
baseUrl = this.site;
|
||||
loadedCheerio = (0, cheerio_1.load)(((_b = (_a = json.data.chapter) === null || _a === void 0 ? void 0 : _a.text) === null || _b === void 0 ? void 0 : _b.text) || "");
|
||||
loadedCheerio("p > a[href]").each(function () {
|
||||
var src = baseUrl + loadedCheerio(this).attr("href");
|
||||
if (!src.startsWith("http")) {
|
||||
src = baseUrl + src;
|
||||
}
|
||||
loadedCheerio(this).find("picture").remove();
|
||||
loadedCheerio(this).removeAttr("href");
|
||||
loadedCheerio("<img src=\"".concat(src, "\">")).appendTo(this);
|
||||
});
|
||||
chapterText = loadedCheerio.html();
|
||||
return [2 /*return*/, chapterText];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
TL.prototype.searchNovels = function (searchTerm, page) {
|
||||
var _a, _b, _c;
|
||||
if (page === void 0) { page = 1; }
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var result, json, novels;
|
||||
var _this = this;
|
||||
return __generator(this, function (_d) {
|
||||
switch (_d.label) {
|
||||
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)(this.site + "/api/site/v2/graphql", {
|
||||
method: "post",
|
||||
headers: {
|
||||
Accept: "application/json, text/plain, */*",
|
||||
"Accept-Language": "ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3",
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
referrer: this.site,
|
||||
body: JSON.stringify({
|
||||
operationName: "Projects",
|
||||
query: "query Projects($hostname:String! $filter:SearchFilter $page:Int $limit:Int){projects(section:{fullUrl:$hostname}filter:$filter page:{pageSize:$limit,pageNumber:$page}){content{title fullUrl covers{url}}}}",
|
||||
variables: {
|
||||
filter: {
|
||||
query: searchTerm,
|
||||
},
|
||||
hostname: "novel.tl",
|
||||
limit: 40,
|
||||
page: page,
|
||||
},
|
||||
}),
|
||||
})];
|
||||
case 1:
|
||||
result = _d.sent();
|
||||
return [4 /*yield*/, result.json()];
|
||||
case 2:
|
||||
json = (_d.sent());
|
||||
novels = [];
|
||||
(_c = (_b = (_a = json === null || json === void 0 ? void 0 : json.data) === null || _a === void 0 ? void 0 : _a.projects) === null || _b === void 0 ? void 0 : _b.content) === null || _c === void 0 ? void 0 : _c.forEach(function (novel) {
|
||||
var _a, _b;
|
||||
return novels.push({
|
||||
name: novel.title,
|
||||
url: "https://" + novel.fullUrl,
|
||||
cover: ((_b = (_a = novel === null || novel === void 0 ? void 0 : novel.covers) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url)
|
||||
? _this.site + novel.covers[0].url
|
||||
: defaultCover_1.defaultCover,
|
||||
});
|
||||
});
|
||||
return [2 /*return*/, novels];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
return TL;
|
||||
}());
|
||||
exports.default = new TL();
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,447 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var filterInputs_1 = require("@libs/filterInputs");
|
||||
var fetch_1 = require("@libs/fetch");
|
||||
var novelStatus_1 = require("@libs/novelStatus");
|
||||
var cheerio_1 = require("cheerio");
|
||||
var dayjs_1 = __importDefault(require("dayjs"));
|
||||
var RLIB = /** @class */ (function () {
|
||||
function RLIB() {
|
||||
this.id = "RLIB";
|
||||
this.name = "RanobeLib";
|
||||
this.site = "https://ranobelib.me";
|
||||
this.version = "1.0.0";
|
||||
this.icon = "src/ru/ranobelib/icon.png";
|
||||
this.ui = undefined;
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.fetchImage = fetch_1.fetchFile;
|
||||
this.filters = [
|
||||
{
|
||||
key: "sort",
|
||||
label: "Сортировка",
|
||||
values: [
|
||||
{ label: "Рейтинг", value: "rate" },
|
||||
{ label: "Имя", value: "name" },
|
||||
{ label: "Просмотры", value: "views" },
|
||||
{ label: "Дате добавления", value: "created_at" },
|
||||
{ label: "Дате обновления", value: "last_chapter_at" },
|
||||
{ label: "Количество глав", value: "chap_count" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Picker,
|
||||
},
|
||||
{
|
||||
key: "order",
|
||||
label: "Порядок",
|
||||
values: [
|
||||
{ label: "По убыванию", value: "desc" },
|
||||
{ label: "По возрастанию", value: "asc" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Picker,
|
||||
},
|
||||
{
|
||||
key: "type",
|
||||
label: "Тип",
|
||||
values: [
|
||||
{ label: "Авторский", value: "14" },
|
||||
{ label: "Английский", value: "13" },
|
||||
{ label: "Китай", value: "12" },
|
||||
{ label: "Корея", value: "11" },
|
||||
{ label: "Фанфик", value: "15" },
|
||||
{ label: "Япония", value: "10" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Checkbox,
|
||||
},
|
||||
{
|
||||
key: "format",
|
||||
label: "Формат выпуска",
|
||||
values: [
|
||||
{ label: "4-кома (Ёнкома)", value: "1" },
|
||||
{ label: "В цвете", value: "4" },
|
||||
{ label: "Веб", value: "6" },
|
||||
{ label: "Вебтун", value: "7" },
|
||||
{ label: "Додзинси", value: "3" },
|
||||
{ label: "Сборник", value: "2" },
|
||||
{ label: "Сингл", value: "5" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Checkbox,
|
||||
},
|
||||
{
|
||||
key: "status",
|
||||
label: "Статус перевода",
|
||||
values: [
|
||||
{ label: "Продолжается", value: "1" },
|
||||
{ label: "Завершен", value: "2" },
|
||||
{ label: "Заморожен", value: "3" },
|
||||
{ label: "Заброшен", value: "4" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Checkbox,
|
||||
},
|
||||
{
|
||||
key: "statuss",
|
||||
label: "Статус тайтла",
|
||||
values: [
|
||||
{ label: "Онгоинг", value: "1" },
|
||||
{ label: "Завершён", value: "2" },
|
||||
{ label: "Анонс", value: "3" },
|
||||
{ label: "Приостановлен", value: "4" },
|
||||
{ label: "Выпуск прекращён", value: "5" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Checkbox,
|
||||
},
|
||||
{
|
||||
key: "genres",
|
||||
label: "Жанры",
|
||||
values: [
|
||||
{ label: "Арт", value: "32" },
|
||||
{ label: "Безумие", value: "91" },
|
||||
{ label: "Боевик", value: "34" },
|
||||
{ label: "Боевые искусства", value: "35" },
|
||||
{ label: "Вампиры", value: "36" },
|
||||
{ label: "Военное", value: "89" },
|
||||
{ label: "Гарем", value: "37" },
|
||||
{ label: "Гендерная интрига", value: "38" },
|
||||
{ label: "Героическое фэнтези", value: "39" },
|
||||
{ label: "Демоны", value: "81" },
|
||||
{ label: "Детектив", value: "40" },
|
||||
{ label: "Детское", value: "88" },
|
||||
{ label: "Дзёсэй", value: "41" },
|
||||
{ label: "Драма", value: "43" },
|
||||
{ label: "Игра", value: "44" },
|
||||
{ label: "Исекай", value: "79" },
|
||||
{ label: "История", value: "45" },
|
||||
{ label: "Киберпанк", value: "46" },
|
||||
{ label: "Кодомо", value: "76" },
|
||||
{ label: "Комедия", value: "47" },
|
||||
{ label: "Космос", value: "83" },
|
||||
{ label: "Магия", value: "85" },
|
||||
{ label: "Махо-сёдзё", value: "48" },
|
||||
{ label: "Машины", value: "90" },
|
||||
{ label: "Меха", value: "49" },
|
||||
{ label: "Мистика", value: "50" },
|
||||
{ label: "Музыка", value: "80" },
|
||||
{ label: "Научная фантастика", value: "51" },
|
||||
{ label: "Омегаверс", value: "77" },
|
||||
{ label: "Пародия", value: "86" },
|
||||
{ label: "Повседневность", value: "52" },
|
||||
{ label: "Полиция", value: "82" },
|
||||
{ label: "Постапокалиптика", value: "53" },
|
||||
{ label: "Приключения", value: "54" },
|
||||
{ label: "Психология", value: "55" },
|
||||
{ label: "Романтика", value: "56" },
|
||||
{ label: "Самурайский боевик", value: "57" },
|
||||
{ label: "Сверхъестественное", value: "58" },
|
||||
{ label: "Сёдзё", value: "59" },
|
||||
{ label: "Сёдзё-ай", value: "60" },
|
||||
{ label: "Сёнэн", value: "61" },
|
||||
{ label: "Сёнэн-ай", value: "62" },
|
||||
{ label: "Спорт", value: "63" },
|
||||
{ label: "Супер сила", value: "87" },
|
||||
{ label: "Сэйнэн", value: "64" },
|
||||
{ label: "Трагедия", value: "65" },
|
||||
{ label: "Триллер", value: "66" },
|
||||
{ label: "Ужасы", value: "67" },
|
||||
{ label: "Фантастика", value: "68" },
|
||||
{ label: "Фэнтези", value: "69" },
|
||||
{ label: "Школа", value: "70" },
|
||||
{ label: "Эротика", value: "71" },
|
||||
{ label: "Этти", value: "72" },
|
||||
{ label: "Юри", value: "73" },
|
||||
{ label: "Яой", value: "74" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Checkbox,
|
||||
},
|
||||
{
|
||||
key: "tags",
|
||||
label: "Теги",
|
||||
values: [
|
||||
{ label: "Авантюристы", value: "328" },
|
||||
{ label: "Антигерой", value: "176" },
|
||||
{ label: "Бессмертные", value: "333" },
|
||||
{ label: "Боги", value: "218" },
|
||||
{ label: "Борьба за власть", value: "309" },
|
||||
{ label: "Брат и сестра", value: "360" },
|
||||
{ label: "Ведьма", value: "339" },
|
||||
{ label: "Видеоигры", value: "204" },
|
||||
{ label: "Виртуальная реальность", value: "214" },
|
||||
{ label: "Владыка демонов", value: "349" },
|
||||
{ label: "Военные", value: "198" },
|
||||
{ label: "Воспоминания из другого мира", value: "310" },
|
||||
{ label: "Выживание", value: "212" },
|
||||
{ label: "ГГ женщина", value: "294" },
|
||||
{ label: "ГГ имба", value: "292" },
|
||||
{ label: "ГГ мужчина", value: "295" },
|
||||
{ label: "ГГ не ояш", value: "325" },
|
||||
{ label: "ГГ не человек", value: "331" },
|
||||
{ label: "ГГ ояш", value: "326" },
|
||||
{ label: "Главный герой бог", value: "324" },
|
||||
{ label: "Глупый ГГ", value: "298" },
|
||||
{ label: "Горничные", value: "171" },
|
||||
{ label: "Гуро", value: "306" },
|
||||
{ label: "Гяру", value: "197" },
|
||||
{ label: "Демоны", value: "157" },
|
||||
{ label: "Драконы", value: "313" },
|
||||
{ label: "Древний мир", value: "317" },
|
||||
{ label: "Зверолюди", value: "163" },
|
||||
{ label: "Зомби", value: "155" },
|
||||
{ label: "Исторические фигуры", value: "323" },
|
||||
{ label: "Кулинария", value: "158" },
|
||||
{ label: "Культивация", value: "161" },
|
||||
{ label: "ЛГБТ", value: "344" },
|
||||
{ label: "ЛитРПГ", value: "319" },
|
||||
{ label: "Лоли", value: "206" },
|
||||
{ label: "Магия", value: "170" },
|
||||
{ label: "Машинный перевод", value: "345" },
|
||||
{ label: "Медицина", value: "159" },
|
||||
{ label: "Межгалактическая война", value: "330" },
|
||||
{ label: "Монстр Девушки", value: "207" },
|
||||
{ label: "Монстры", value: "208" },
|
||||
{ label: "Мрачный мир", value: "316" },
|
||||
{ label: "Музыка", value: "358" },
|
||||
{ label: "Музыка", value: "209" },
|
||||
{ label: "Ниндзя", value: "199" },
|
||||
{ label: "Обратный Гарем", value: "210" },
|
||||
{ label: "Офисные Работники", value: "200" },
|
||||
{ label: "Пираты", value: "341" },
|
||||
{ label: "Подземелья", value: "314" },
|
||||
{ label: "Политика", value: "311" },
|
||||
{ label: "Полиция", value: "201" },
|
||||
{ label: "Преступники / Криминал", value: "205" },
|
||||
{ label: "Призраки / Духи", value: "196" },
|
||||
{ label: "Призыватели", value: "329" },
|
||||
{ label: "Прыжки между мирами", value: "321" },
|
||||
{ label: "Путешествие в другой мир", value: "318" },
|
||||
{ label: "Путешествие во времени", value: "213" },
|
||||
{ label: "Рабы", value: "355" },
|
||||
{ label: "Ранги силы", value: "312" },
|
||||
{ label: "Реинкарнация", value: "154" },
|
||||
{ label: "Самураи", value: "202" },
|
||||
{ label: "Скрытие личности", value: "315" },
|
||||
{ label: "Средневековье", value: "174" },
|
||||
{ label: "Традиционные игры", value: "203" },
|
||||
{ label: "Умный ГГ", value: "303" },
|
||||
{ label: "Характерный рост", value: "332" },
|
||||
{ label: "Хикикомори", value: "167" },
|
||||
{ label: "Эволюция", value: "322" },
|
||||
{ label: "Элементы РПГ", value: "327" },
|
||||
{ label: "Эльфы", value: "217" },
|
||||
{ label: "Якудза", value: "165" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Checkbox,
|
||||
},
|
||||
];
|
||||
}
|
||||
RLIB.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d;
|
||||
var showLatestNovels = _a.showLatestNovels, filters = _a.filters;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var url, result, body, loadedCheerio, novels;
|
||||
return __generator(this, function (_e) {
|
||||
switch (_e.label) {
|
||||
case 0:
|
||||
url = "".concat(this.site, "/manga-list?sort=");
|
||||
url += showLatestNovels ? "last_chapter_at" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rate";
|
||||
url += "&dir=" + ((filters === null || filters === void 0 ? void 0 : filters.order) || "desc");
|
||||
if (filters) {
|
||||
if (Array.isArray(filters.type) && filters.type.length) {
|
||||
url += filters.type.map(function (i) { return "&types[]=".concat(i); }).join("");
|
||||
}
|
||||
if (Array.isArray(filters.format) && ((_b = filters.format) === null || _b === void 0 ? void 0 : _b.length)) {
|
||||
url += filters.format.map(function (i) { return "&format[include][]=".concat(i); }).join("");
|
||||
}
|
||||
if (Array.isArray(filters.status) && filters.status.length) {
|
||||
url += filters.status.map(function (i) { return "&status[]=".concat(i); }).join("");
|
||||
}
|
||||
if (Array.isArray(filters.statuss) && filters.statuss.length) {
|
||||
url += filters.statuss.map(function (i) { return "&manga_status[]=".concat(i); }).join("");
|
||||
}
|
||||
if (Array.isArray(filters.genres) && filters.genres.length) {
|
||||
url += filters.genres.map(function (i) { return "&genres[include][]=".concat(i); }).join("");
|
||||
}
|
||||
if (Array.isArray(filters.tags) && filters.tags.length) {
|
||||
url += filters.tags.map(function (i) { return "&tags[include][]=".concat(i); }).join("");
|
||||
}
|
||||
}
|
||||
url += "&page=" + pageNo;
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(url)];
|
||||
case 1:
|
||||
result = _e.sent();
|
||||
return [4 /*yield*/, result.text()];
|
||||
case 2:
|
||||
body = _e.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
this.ui = (_d = (_c = loadedCheerio("a.header-right-menu__item")
|
||||
.attr("href")) === null || _c === void 0 ? void 0 : _c.replace) === null || _d === void 0 ? void 0 : _d.call(_c, /[^0-9]/g, "");
|
||||
novels = [];
|
||||
loadedCheerio(".media-card-wrap").each(function () {
|
||||
var name = loadedCheerio(this).find(".media-card__title").text();
|
||||
var cover = loadedCheerio(this).find("a.media-card").attr("data-src");
|
||||
var url = loadedCheerio(this).find("a.media-card").attr("href");
|
||||
if (!url)
|
||||
return;
|
||||
novels.push({ name: name, cover: cover, url: url });
|
||||
});
|
||||
return [2 /*return*/, novels];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
RLIB.prototype.parseNovelAndChapters = function (novelUrl) {
|
||||
var _a, _b, _c, _d, _e, _f, _g;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var result, body, loadedCheerio, novel, chapters, chaptersRaw, chaptersJson;
|
||||
var _this = this;
|
||||
return __generator(this, function (_h) {
|
||||
switch (_h.label) {
|
||||
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)(novelUrl)];
|
||||
case 1:
|
||||
result = _h.sent();
|
||||
return [4 /*yield*/, result.text()];
|
||||
case 2:
|
||||
body = _h.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
novel = {
|
||||
url: novelUrl,
|
||||
};
|
||||
novel.name = loadedCheerio(".media-name__main").text().trim();
|
||||
novel.cover = loadedCheerio(".media-sidebar__cover img").attr("src");
|
||||
novel.summary = loadedCheerio(".media-description__text").text().trim();
|
||||
novel.genres = loadedCheerio('div[class="media-tags"]')
|
||||
.text()
|
||||
.trim()
|
||||
.replace(/[\n\r]+/g, ", ")
|
||||
.replace(/ /g, "");
|
||||
loadedCheerio('div[class="media-info-list paper"] > [class="media-info-list__item"]').each(function () {
|
||||
var name = loadedCheerio(this)
|
||||
.find('div[class="media-info-list__title"]')
|
||||
.text();
|
||||
if (name === "Статус перевода") {
|
||||
novel.status =
|
||||
loadedCheerio(this).find("div:nth-child(2)").text().trim() ===
|
||||
"Продолжается"
|
||||
? novelStatus_1.NovelStatus.Ongoing
|
||||
: novelStatus_1.NovelStatus.Completed;
|
||||
}
|
||||
else if (name === "Автор") {
|
||||
novel.author = loadedCheerio(this)
|
||||
.find("div:nth-child(2)")
|
||||
.text()
|
||||
.trim();
|
||||
}
|
||||
});
|
||||
chapters = [];
|
||||
chaptersRaw = body.match(/window.__DATA__ = [\s\S]*?window._this.SITE_COLOR_/gm);
|
||||
chaptersRaw = (_d = (_c = (_b = (_a = chaptersRaw === null || chaptersRaw === void 0 ? void 0 : chaptersRaw[0]) === null || _a === void 0 ? void 0 : _a.replace("window.__DATA__ = ", "")) === null || _b === void 0 ? void 0 : _b.replace("window._this.SITE_COLOR_", "")) === null || _c === void 0 ? void 0 : _c.trim()) === null || _d === void 0 ? void 0 : _d.slice(0, -1);
|
||||
chaptersJson = JSON.parse(chaptersRaw);
|
||||
this.ui = (_e = chaptersJson === null || chaptersJson === void 0 ? void 0 : chaptersJson.user) === null || _e === void 0 ? void 0 : _e.id;
|
||||
(_g = (_f = chaptersJson.chapters) === null || _f === void 0 ? void 0 : _f.list) === null || _g === void 0 ? void 0 : _g.forEach(function (chapter) {
|
||||
var _a;
|
||||
return chapters.push({
|
||||
name: (_a = "\u0422\u043E\u043C ".concat(chapter.chapter_volume, " \u0413\u043B\u0430\u0432\u0430 ").concat(chapter.chapter_number, " ").concat(chapter.chapter_name)) === null || _a === void 0 ? void 0 : _a.trim(),
|
||||
releaseTime: (0, dayjs_1.default)(chapter.chapter_created_at).format("LLL"),
|
||||
url: "".concat(_this.site, "/").concat(chaptersJson.manga.slug, "/v").concat(chapter.chapter_volume, "/c").concat(chapter.chapter_number, "?bid=") +
|
||||
((chapter === null || chapter === void 0 ? void 0 : chapter.branch_id) || ""),
|
||||
});
|
||||
});
|
||||
novel.chapters = chapters.reverse();
|
||||
return [2 /*return*/, novel];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
RLIB.prototype.parseChapter = function (chapterUrl) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var result, body, loadedCheerio, baseUrl, chapterText;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)(chapterUrl + (this.ui ? "&ui=".concat(this.ui) : ""))];
|
||||
case 1:
|
||||
result = _a.sent();
|
||||
return [4 /*yield*/, result.text()];
|
||||
case 2:
|
||||
body = _a.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
baseUrl = this.site;
|
||||
loadedCheerio(".reader-container img").each(function () {
|
||||
var src = loadedCheerio(this).attr("data-src") || loadedCheerio(this).attr("src");
|
||||
if (!(src === null || src === void 0 ? void 0 : src.startsWith("http"))) {
|
||||
loadedCheerio(this).attr("src", baseUrl + src);
|
||||
}
|
||||
else {
|
||||
loadedCheerio(this).attr("src", src);
|
||||
}
|
||||
loadedCheerio(this).removeAttr("data-src");
|
||||
});
|
||||
chapterText = loadedCheerio(".reader-container").html();
|
||||
return [2 /*return*/, chapterText || ""];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
RLIB.prototype.searchNovels = function (searchTerm) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var result, body, novels;
|
||||
var _this = this;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)("".concat(this.site, "/search?q=").concat(searchTerm, "&type=manga"))];
|
||||
case 1:
|
||||
result = _a.sent();
|
||||
return [4 /*yield*/, result.json()];
|
||||
case 2:
|
||||
body = (_a.sent());
|
||||
novels = [];
|
||||
body.forEach(function (novel) {
|
||||
return novels.push({
|
||||
name: (novel === null || novel === void 0 ? void 0 : novel.rus_name) || novel.name,
|
||||
cover: novel === null || novel === void 0 ? void 0 : novel.coverImage,
|
||||
url: (novel === null || novel === void 0 ? void 0 : novel.href) || _this.site + "/" + novel.slug,
|
||||
});
|
||||
});
|
||||
return [2 /*return*/, novels];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
return RLIB;
|
||||
}());
|
||||
exports.default = new RLIB();
|
||||
@@ -0,0 +1,218 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var filterInputs_1 = require("@libs/filterInputs");
|
||||
var defaultCover_1 = require("@libs/defaultCover");
|
||||
var fetch_1 = require("@libs/fetch");
|
||||
var novelStatus_1 = require("@libs/novelStatus");
|
||||
var cheerio_1 = require("cheerio");
|
||||
var dayjs_1 = __importDefault(require("dayjs"));
|
||||
var RNRF = /** @class */ (function () {
|
||||
function RNRF() {
|
||||
this.id = "RNRF";
|
||||
this.name = "РанобэРФ";
|
||||
this.site = "https://ранобэ.рф";
|
||||
this.version = "1.0.0";
|
||||
this.icon = "src/ru/ranoberf/icon.png";
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.fetchImage = fetch_1.fetchFile;
|
||||
this.filters = [
|
||||
{
|
||||
key: "sort",
|
||||
label: "Сортировка",
|
||||
values: [
|
||||
{ label: "Рейтинг", value: "popular" },
|
||||
{ label: "Дате добавления", value: "new" },
|
||||
{ label: "Дате обновления", value: "lastPublishedChapter" },
|
||||
{ label: "Законченные", value: "completed" },
|
||||
],
|
||||
inputType: filterInputs_1.FilterInputs.Picker,
|
||||
},
|
||||
];
|
||||
}
|
||||
RNRF.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d;
|
||||
var showLatestNovels = _a.showLatestNovels, filters = _a.filters;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var url, result, body, loadedCheerio, jsonRaw, json, novels;
|
||||
var _this = this;
|
||||
return __generator(this, function (_e) {
|
||||
switch (_e.label) {
|
||||
case 0:
|
||||
url = this.site + "/books?order=";
|
||||
url += showLatestNovels
|
||||
? "lastPublishedChapter"
|
||||
: (filters === null || filters === void 0 ? void 0 : filters.sort) || "popular";
|
||||
url += "&page=" + pageNo;
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(url)];
|
||||
case 1:
|
||||
result = _e.sent();
|
||||
return [4 /*yield*/, result.text()];
|
||||
case 2:
|
||||
body = _e.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
jsonRaw = loadedCheerio("#__NEXT_DATA__").html();
|
||||
json = JSON.parse(jsonRaw || "{}");
|
||||
novels = [];
|
||||
(_d = (_c = (_b = json.props.pageProps) === null || _b === void 0 ? void 0 : _b.totalData) === null || _c === void 0 ? void 0 : _c.items) === null || _d === void 0 ? void 0 : _d.forEach(function (novel) {
|
||||
var _a;
|
||||
return novels.push({
|
||||
name: novel.title,
|
||||
cover: ((_a = novel === null || novel === void 0 ? void 0 : novel.verticalImage) === null || _a === void 0 ? void 0 : _a.url)
|
||||
? _this.site + novel.verticalImage.url
|
||||
: defaultCover_1.defaultCover,
|
||||
url: _this.site + "/" + novel.slug,
|
||||
});
|
||||
});
|
||||
return [2 /*return*/, novels];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
RNRF.prototype.parseNovelAndChapters = function (novelUrl) {
|
||||
var _a, _b;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var result, body, loadedCheerio, jsonRaw, book, novel, chapters;
|
||||
var _this = this;
|
||||
return __generator(this, function (_c) {
|
||||
switch (_c.label) {
|
||||
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)(novelUrl)];
|
||||
case 1:
|
||||
result = _c.sent();
|
||||
return [4 /*yield*/, result.text()];
|
||||
case 2:
|
||||
body = _c.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
jsonRaw = loadedCheerio("#__NEXT_DATA__").html();
|
||||
book = JSON.parse(jsonRaw || "{}").props.pageProps.book;
|
||||
novel = {
|
||||
url: novelUrl,
|
||||
name: book === null || book === void 0 ? void 0 : book.title,
|
||||
cover: ((_a = book === null || book === void 0 ? void 0 : book.verticalImage) === null || _a === void 0 ? void 0 : _a.url)
|
||||
? this.site + book.verticalImage.url
|
||||
: defaultCover_1.defaultCover,
|
||||
summary: book === null || book === void 0 ? void 0 : book.description,
|
||||
author: (book === null || book === void 0 ? void 0 : book.author) || "",
|
||||
genres: book === null || book === void 0 ? void 0 : book.genres.map(function (item) { return item.title; }).join(", "),
|
||||
status: (book === null || book === void 0 ? void 0 : book.additionalInfo.includes("Активен"))
|
||||
? novelStatus_1.NovelStatus.Ongoing
|
||||
: novelStatus_1.NovelStatus.Completed,
|
||||
};
|
||||
chapters = [];
|
||||
(_b = book === null || book === void 0 ? void 0 : book.chapters) === null || _b === void 0 ? void 0 : _b.forEach(function (chapter) {
|
||||
if (!(chapter === null || chapter === void 0 ? void 0 : chapter.isDonate) || (chapter === null || chapter === void 0 ? void 0 : chapter.isUserPaid)) {
|
||||
chapters.push({
|
||||
name: chapter.title,
|
||||
releaseTime: (0, dayjs_1.default)(chapter.publishedAt).format("LLL"),
|
||||
url: _this.site + chapter.url,
|
||||
});
|
||||
}
|
||||
});
|
||||
novel.chapters = chapters.reverse();
|
||||
return [2 /*return*/, novel];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
RNRF.prototype.parseChapter = function (chapterUrl) {
|
||||
var _a, _b, _c;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var result, body, loadedCheerio, jsonRaw, json, baseUrl, chapterText;
|
||||
return __generator(this, function (_d) {
|
||||
switch (_d.label) {
|
||||
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)(chapterUrl)];
|
||||
case 1:
|
||||
result = _d.sent();
|
||||
return [4 /*yield*/, result.text()];
|
||||
case 2:
|
||||
body = _d.sent();
|
||||
loadedCheerio = (0, cheerio_1.load)(body);
|
||||
jsonRaw = loadedCheerio("#__NEXT_DATA__").html();
|
||||
json = JSON.parse(jsonRaw || "{}");
|
||||
loadedCheerio = (0, cheerio_1.load)(((_c = (_b = (_a = json.props.pageProps) === null || _a === void 0 ? void 0 : _a.chapter) === null || _b === void 0 ? void 0 : _b.content) === null || _c === void 0 ? void 0 : _c.text) || "");
|
||||
baseUrl = this.site;
|
||||
loadedCheerio("img").each(function () {
|
||||
var _a;
|
||||
if (!((_a = loadedCheerio(this).attr("src")) === null || _a === void 0 ? void 0 : _a.startsWith("http"))) {
|
||||
var src = loadedCheerio(this).attr("src");
|
||||
loadedCheerio(this).attr("src", baseUrl + src);
|
||||
}
|
||||
});
|
||||
chapterText = loadedCheerio.html();
|
||||
return [2 /*return*/, chapterText];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
RNRF.prototype.searchNovels = function (searchTerm) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var url, result, body, novels;
|
||||
var _this = this;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
url = "".concat(this.site, "/v3/books?filter[or][0][title][like]=").concat(searchTerm, "&filter[or][1][titleEn][like]=").concat(searchTerm, "&filter[or][2][fullTitle][like]=").concat(searchTerm, "&filter[status][]=active&filter[status][]=abandoned&filter[status][]=completed&expand=verticalImage");
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(url)];
|
||||
case 1:
|
||||
result = _a.sent();
|
||||
return [4 /*yield*/, result.json()];
|
||||
case 2:
|
||||
body = (_a.sent());
|
||||
novels = [];
|
||||
body.items.forEach(function (novel) {
|
||||
var _a;
|
||||
return novels.push({
|
||||
name: novel.title,
|
||||
cover: ((_a = novel === null || novel === void 0 ? void 0 : novel.verticalImage) === null || _a === void 0 ? void 0 : _a.url)
|
||||
? _this.site + novel.verticalImage.url
|
||||
: defaultCover_1.defaultCover,
|
||||
url: _this.site + "/" + novel.slug,
|
||||
});
|
||||
});
|
||||
return [2 /*return*/, novels];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
return RNRF;
|
||||
}());
|
||||
exports.default = new RNRF();
|
||||
File diff suppressed because it is too large
Load Diff
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "turkcelightnovels", "sourceSite": "https://turkcelightnovels.com/", "sourceName": "TurkceLightNovels", "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": "Picker" }], "options": { "path": { "novels": "light-novel", "novel": "light-novel", "chapter": "light-novel" }, "lang": "Turkish" } });
|
||||
var plugin = new MadaraPlugin({ "id": "turkcelightnovels", "sourceSite": "https://turkcelightnovels.com/", "sourceName": "TurkceLightNovels", "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": 1 }], "options": { "path": { "novels": "light-novel", "novel": "light-novel", "chapter": "light-novel" }, "lang": "Turkish" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -61,7 +61,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
MadaraPlugin.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
@@ -74,7 +74,7 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
novels = [];
|
||||
url = this.site;
|
||||
if ((filters === null || filters === void 0 ? void 0 : filters.genres) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.genres)) {
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres + '/';
|
||||
url += ((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.genres) + filters.genres;
|
||||
}
|
||||
else {
|
||||
url += ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.path) === null || _g === void 0 ? void 0 : _g.novels) ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
@@ -265,5 +265,5 @@ var MadaraPlugin = /** @class */ (function () {
|
||||
};
|
||||
return MadaraPlugin;
|
||||
}());
|
||||
var plugin = new MadaraPlugin({ "id": "webnoveloku", "sourceSite": "https://www.webnoveloku.com/", "sourceName": "WebNovelOku ", "filters": [{ "key": "sort", "label": "Sırala", "values": [{ "label": "A-Z", "value": "alphabet" }, { "label": "En Son", "value": "latest" }, { "label": "Görüntülenme", "value": "views" }, { "label": "Popülarite", "value": "trending" }, { "label": "Reyting", "value": "rating" }, { "label": "Yeni", "value": "new-manga" }], "inputType": "Picker" }], "options": { "lang": "Turkish" } });
|
||||
var plugin = new MadaraPlugin({ "id": "webnoveloku", "sourceSite": "https://www.webnoveloku.com/", "sourceName": "WebNovelOku ", "filters": [{ "key": "sort", "label": "Sırala", "values": [{ "label": "A-Z", "value": "alphabet" }, { "label": "En Son", "value": "latest" }, { "label": "Görüntülenme", "value": "views" }, { "label": "Popülarite", "value": "trending" }, { "label": "Reyting", "value": "rating" }, { "label": "Yeni", "value": "new-manga" }], "inputType": 1 }], "options": { "lang": "Turkish" } });
|
||||
exports.default = plugin;
|
||||
|
||||
@@ -0,0 +1,227 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var fetch_1 = require("@libs/fetch");
|
||||
var novelStatus_1 = require("@libs/novelStatus");
|
||||
var dayjs_1 = __importDefault(require("dayjs"));
|
||||
var Smakolykytl = /** @class */ (function () {
|
||||
function Smakolykytl() {
|
||||
this.id = "smakolykytl";
|
||||
this.name = "Смаколики";
|
||||
this.site = "https://smakolykytl.site/";
|
||||
this.version = "1.0.0";
|
||||
this.icon = "src/ua/smakolykytl/icon.png";
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.fetchImage = fetch_1.fetchFile;
|
||||
}
|
||||
Smakolykytl.prototype.popularNovels = function (pageNo, _a) {
|
||||
var _b;
|
||||
var showLatestNovels = _a.showLatestNovels, filters = _a.filters;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var url, result, json, novels;
|
||||
var _this = this;
|
||||
return __generator(this, function (_c) {
|
||||
switch (_c.label) {
|
||||
case 0:
|
||||
url = showLatestNovels
|
||||
? "https://api.smakolykytl.site/api/user/updates"
|
||||
: "https://api.smakolykytl.site/api/user/projects";
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)(url)];
|
||||
case 1:
|
||||
result = _c.sent();
|
||||
return [4 /*yield*/, result.json()];
|
||||
case 2:
|
||||
json = (_c.sent());
|
||||
novels = [];
|
||||
(_b = ((json === null || json === void 0 ? void 0 : json.projects) || (json === null || json === void 0 ? void 0 : json.updates))) === null || _b === void 0 ? void 0 : _b.forEach(function (novel) {
|
||||
return novels.push({
|
||||
name: novel.title,
|
||||
cover: novel.image.url,
|
||||
url: _this.site + "titles/" + novel.id,
|
||||
});
|
||||
});
|
||||
return [2 /*return*/, novels];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
Smakolykytl.prototype.parseNovelAndChapters = function (novelUrl) {
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var id, result, book, novel, tags, chapters, res, data;
|
||||
var _this = this;
|
||||
return __generator(this, function (_k) {
|
||||
switch (_k.label) {
|
||||
case 0:
|
||||
id = novelUrl.split("/").pop();
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)("https://api.smakolykytl.site/api/user/projects/" + id)];
|
||||
case 1:
|
||||
result = _k.sent();
|
||||
return [4 /*yield*/, result.json()];
|
||||
case 2:
|
||||
book = (_k.sent());
|
||||
novel = {
|
||||
url: novelUrl,
|
||||
name: (_a = book === null || book === void 0 ? void 0 : book.project) === null || _a === void 0 ? void 0 : _a.title,
|
||||
cover: (_c = (_b = book === null || book === void 0 ? void 0 : book.project) === null || _b === void 0 ? void 0 : _b.image) === null || _c === void 0 ? void 0 : _c.url,
|
||||
summary: (_d = book === null || book === void 0 ? void 0 : book.project) === null || _d === void 0 ? void 0 : _d.description,
|
||||
author: (_e = book === null || book === void 0 ? void 0 : book.project) === null || _e === void 0 ? void 0 : _e.author,
|
||||
status: ((_f = book === null || book === void 0 ? void 0 : book.project) === null || _f === void 0 ? void 0 : _f.status_translate.includes("Триває"))
|
||||
? novelStatus_1.NovelStatus.Ongoing
|
||||
: novelStatus_1.NovelStatus.Completed,
|
||||
};
|
||||
tags = [(_g = book === null || book === void 0 ? void 0 : book.project) === null || _g === void 0 ? void 0 : _g.genres, (_h = book === null || book === void 0 ? void 0 : book.project) === null || _h === void 0 ? void 0 : _h.tags]
|
||||
.flat()
|
||||
.map(function (tags) { return tags === null || tags === void 0 ? void 0 : tags.title; })
|
||||
.filter(function (tags) { return tags; });
|
||||
if (tags.length > 0) {
|
||||
novel.genres = tags.join(", ");
|
||||
}
|
||||
chapters = [];
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)("https://api.smakolykytl.site/api/user/projects/" + id + "/books")];
|
||||
case 3:
|
||||
res = _k.sent();
|
||||
return [4 /*yield*/, res.json()];
|
||||
case 4:
|
||||
data = (_k.sent());
|
||||
(_j = data === null || data === void 0 ? void 0 : data.books) === null || _j === void 0 ? void 0 : _j.forEach(function (volume) {
|
||||
var _a;
|
||||
return (_a = volume === null || volume === void 0 ? void 0 : volume.chapters) === null || _a === void 0 ? void 0 : _a.map(function (chapter) {
|
||||
return chapters.push({
|
||||
name: volume.title + " " + chapter.title,
|
||||
releaseTime: (0, dayjs_1.default)(chapter.modifiedAt).format("LLL"),
|
||||
url: _this.site + "read/" + chapter.id,
|
||||
});
|
||||
});
|
||||
});
|
||||
novel.chapters = chapters;
|
||||
return [2 /*return*/, novel];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
Smakolykytl.prototype.parseChapter = function (chapterUrl) {
|
||||
var _a;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var id, result, json, chapterRaw, chapterText;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
id = chapterUrl.split("/").pop();
|
||||
return [4 /*yield*/, (0, fetch_1.fetchApi)("https://api.smakolykytl.site/api/user/chapters/" + id)];
|
||||
case 1:
|
||||
result = _b.sent();
|
||||
return [4 /*yield*/, result.json()];
|
||||
case 2:
|
||||
json = (_b.sent());
|
||||
chapterRaw = JSON.parse(((_a = json === null || json === void 0 ? void 0 : json.chapter) === null || _a === void 0 ? void 0 : _a.content) || "[]");
|
||||
chapterText = jsonToHtml(chapterRaw);
|
||||
return [2 /*return*/, chapterText];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
Smakolykytl.prototype.searchNovels = function (searchTerm) {
|
||||
var _a, _b;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var result, json, novels;
|
||||
var _this = this;
|
||||
return __generator(this, function (_c) {
|
||||
switch (_c.label) {
|
||||
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)("https://api.smakolykytl.site/api/user/projects")];
|
||||
case 1:
|
||||
result = _c.sent();
|
||||
return [4 /*yield*/, result.json()];
|
||||
case 2:
|
||||
json = (_c.sent());
|
||||
novels = [];
|
||||
(_b = (_a = json === null || json === void 0 ? void 0 : json.projects) === null || _a === void 0 ? void 0 : _a.filter(function (novel) {
|
||||
return novel.title.includes(searchTerm) || String(novel.id) === searchTerm;
|
||||
})) === null || _b === void 0 ? void 0 : _b.forEach(function (novel) {
|
||||
return novels.push({
|
||||
name: novel.title,
|
||||
cover: novel.image.url,
|
||||
url: _this.site + "titles/" + novel.id,
|
||||
});
|
||||
});
|
||||
return [2 /*return*/, novels];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
return Smakolykytl;
|
||||
}());
|
||||
exports.default = new Smakolykytl();
|
||||
function jsonToHtml(json, html) {
|
||||
if (html === void 0) { html = ""; }
|
||||
json.forEach(function (element) {
|
||||
switch (element.type) {
|
||||
case "hardBreak":
|
||||
html += "<br>";
|
||||
break;
|
||||
case "horizontalRule":
|
||||
html += "<hr>";
|
||||
break;
|
||||
case "image":
|
||||
if (element.attrs) {
|
||||
var attrs = Object.entries(element.attrs)
|
||||
.filter(function (attr) { return attr === null || attr === void 0 ? void 0 : attr[1]; })
|
||||
.map(function (attr) { return "".concat(attr[0], "=\"").concat(attr[1], "\""); });
|
||||
html += "<img " + attrs.join("; ") + ">";
|
||||
}
|
||||
break;
|
||||
case "paragraph":
|
||||
html +=
|
||||
"<p>" +
|
||||
(element.content ? jsonToHtml(element.content) : "<br>") +
|
||||
"</p>";
|
||||
break;
|
||||
case "text":
|
||||
html += element.text;
|
||||
break;
|
||||
default:
|
||||
html += JSON.stringify(element, null, "\t"); //maybe I missed something.
|
||||
break;
|
||||
}
|
||||
});
|
||||
return html;
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 70 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 106 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 210 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 237 KiB |
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
@@ -247,6 +247,6 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"arnovel","sourceSite":"https://arnovel.me/","sourceName":"ArNovel","filters":[{"key":"sort","label":"الترتيب حسب","values":[{"label":"A-Z","value":"alphabet"},{"label":"الآخير","value":"latest"},{"label":"الأكثر مشاهدة","value":"views"},{"label":"التقييم","value":"rating"},{"label":"جديد","value":"new-manga"},{"label":"شائع","value":"trending"}],"inputType":"Picker"},{"key":"genres","label":"التصنيفات","values":[{"label":"أكشن","value":"%d8%a3%d9%83%d8%b4%d9%86"},{"label":"إتشي","value":"%d8%a5%d8%aa%d8%b4%d9%80%d9%8a"},{"label":"بالغ","value":"%d8%a8%d8%a7%d9%84%d8%ba"},{"label":"تاريخي","value":"%d8%aa%d8%a7%d8%b1%d9%8a%d8%ae%d9%8a"},{"label":"تراجدي","value":"%d8%aa%d8%b1%d8%a7%d8%ac%d8%af%d9%8a"},{"label":"جوسي","value":"%d8%ac%d9%88%d8%b3%d9%8a"},{"label":"حريم","value":"%d8%ad%d8%b1%d9%8a%d9%85"},{"label":"حياة مدرسية","value":"%d8%ad%d9%8a%d8%a7%d8%a9-%d9%85%d8%af%d8%b1%d8%b3%d9%8a%d8%a9"},{"label":"خارق لطبيعية","value":"%d8%ae%d8%a7%d8%b1%d9%82-%d9%84%d8%b7%d8%a8%d9%8a%d8%b9%d9%8a%d8%a9"},{"label":"خيال","value":"%d8%ae%d9%8a%d8%a7%d9%84"},{"label":"خيال علمي","value":"%d8%ae%d9%8a%d8%a7%d9%84-%d8%b9%d9%84%d9%85%d9%8a"},{"label":"دراما","value":"%d8%af%d8%b1%d8%a7%d9%85%d8%a7"},{"label":"راشد","value":"%d8%b1%d8%a7%d8%b4%d8%af"},{"label":"رعب","value":"%d8%b1%d8%b9%d8%a8"},{"label":"رومنسي","value":"%d8%b1%d9%88%d9%85%d9%86%d8%b3%d9%8a"},{"label":"رياضي","value":"%d8%b1%d9%8a%d8%a7%d8%b6%d9%8a"},{"label":"سينين","value":"%d8%b3%d9%8a%d9%86%d9%8a%d9%86"},{"label":"شريحة من الحياة","value":"%d8%b4%d8%b1%d9%8a%d8%ad%d8%a9-%d9%85%d9%86-%d8%a7%d9%84%d8%ad%d9%8a%d8%a7%d8%a9"},{"label":"شوجو","value":"%d8%b4%d9%88%d8%ac%d9%88"},{"label":"شونين","value":"%d8%b4%d9%88%d9%86%d9%8a%d9%86"},{"label":"غموض","value":"%d8%ba%d9%85%d9%88%d8%b6"},{"label":"فنون قتال","value":"%d9%81%d9%86%d9%88%d9%86-%d9%82%d8%aa%d8%a7%d9%84"},{"label":"كوميديا","value":"%d9%83%d9%88%d9%85%d9%8a%d8%af%d9%8a%d8%a7"},{"label":"مغامرات","value":"%d9%85%d8%ba%d8%a7%d9%85%d8%b1%d8%a7%d8%aa"},{"label":"منتهية","value":"%d9%85%d9%86%d8%aa%d9%87%d9%8a%d8%a9"},{"label":"ميكا","value":"%d9%85%d9%8a%d9%83%d8%a7"},{"label":"نفسي","value":"%d9%86%d9%81%d8%b3%d9%8a"}],"inputType":"Picker"}],"options":{"path":{"genres":"home/novel-genre"},"useNewChapterEndpoint":true,"lang":"Arabic"}});
|
||||
const plugin = new MadaraPlugin({"id":"arnovel","sourceSite":"https://arnovel.me/","sourceName":"ArNovel","filters":[{"key":"sort","label":"الترتيب حسب","values":[{"label":"A-Z","value":"alphabet"},{"label":"الآخير","value":"latest"},{"label":"الأكثر مشاهدة","value":"views"},{"label":"التقييم","value":"rating"},{"label":"جديد","value":"new-manga"},{"label":"شائع","value":"trending"}],"inputType":1},{"key":"genres","label":"التصنيفات","values":[{"label":"أكشن","value":"%d8%a3%d9%83%d8%b4%d9%86"},{"label":"إتشي","value":"%d8%a5%d8%aa%d8%b4%d9%80%d9%8a"},{"label":"بالغ","value":"%d8%a8%d8%a7%d9%84%d8%ba"},{"label":"تاريخي","value":"%d8%aa%d8%a7%d8%b1%d9%8a%d8%ae%d9%8a"},{"label":"تراجدي","value":"%d8%aa%d8%b1%d8%a7%d8%ac%d8%af%d9%8a"},{"label":"جوسي","value":"%d8%ac%d9%88%d8%b3%d9%8a"},{"label":"حريم","value":"%d8%ad%d8%b1%d9%8a%d9%85"},{"label":"حياة مدرسية","value":"%d8%ad%d9%8a%d8%a7%d8%a9-%d9%85%d8%af%d8%b1%d8%b3%d9%8a%d8%a9"},{"label":"خارق لطبيعية","value":"%d8%ae%d8%a7%d8%b1%d9%82-%d9%84%d8%b7%d8%a8%d9%8a%d8%b9%d9%8a%d8%a9"},{"label":"خيال","value":"%d8%ae%d9%8a%d8%a7%d9%84"},{"label":"خيال علمي","value":"%d8%ae%d9%8a%d8%a7%d9%84-%d8%b9%d9%84%d9%85%d9%8a"},{"label":"دراما","value":"%d8%af%d8%b1%d8%a7%d9%85%d8%a7"},{"label":"راشد","value":"%d8%b1%d8%a7%d8%b4%d8%af"},{"label":"رعب","value":"%d8%b1%d8%b9%d8%a8"},{"label":"رومنسي","value":"%d8%b1%d9%88%d9%85%d9%86%d8%b3%d9%8a"},{"label":"رياضي","value":"%d8%b1%d9%8a%d8%a7%d8%b6%d9%8a"},{"label":"سينين","value":"%d8%b3%d9%8a%d9%86%d9%8a%d9%86"},{"label":"شريحة من الحياة","value":"%d8%b4%d8%b1%d9%8a%d8%ad%d8%a9-%d9%85%d9%86-%d8%a7%d9%84%d8%ad%d9%8a%d8%a7%d8%a9"},{"label":"شوجو","value":"%d8%b4%d9%88%d8%ac%d9%88"},{"label":"شونين","value":"%d8%b4%d9%88%d9%86%d9%8a%d9%86"},{"label":"غموض","value":"%d8%ba%d9%85%d9%88%d8%b6"},{"label":"فنون قتال","value":"%d9%81%d9%86%d9%88%d9%86-%d9%82%d8%aa%d8%a7%d9%84"},{"label":"كوميديا","value":"%d9%83%d9%88%d9%85%d9%8a%d8%af%d9%8a%d8%a7"},{"label":"مغامرات","value":"%d9%85%d8%ba%d8%a7%d9%85%d8%b1%d8%a7%d8%aa"},{"label":"منتهية","value":"%d9%85%d9%86%d8%aa%d9%87%d9%8a%d8%a9"},{"label":"ميكا","value":"%d9%85%d9%8a%d9%83%d8%a7"},{"label":"نفسي","value":"%d9%86%d9%81%d8%b3%d9%8a"}],"inputType":1}],"options":{"path":{"genres":"home/novel-genre"},"useNewChapterEndpoint":true,"lang":"Arabic"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
@@ -247,6 +247,6 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"hizomanga","sourceSite":"https://hizomanga.com/","sourceName":"HizoManga","filters":[{"key":"sort","label":"ترتيب حسب","values":[{"label":"A-Z","value":"alphabet"},{"label":"New","value":"new-manga"},{"label":"الأحدث","value":"latest"},{"label":"الأكثر مشاهدة","value":"views"},{"label":"التقييم","value":"rating"},{"label":"الرائج","value":"trending"}],"inputType":"Picker"},{"key":"genres","label":"التصنيفات","values":[{"label":"آلات","value":"mechanisms"},{"label":"أكشن","value":"action"},{"label":"إثارة","value":"excitement"},{"label":"إيسكاي","value":"%d8%a5%d9%8a%d8%b3%d9%83%d8%a7%d9%8a"},{"label":"الحياة اليومية","value":"slice-of-life"},{"label":"الحياة مدرسية","value":"school-life"},{"label":"تاريخي","value":"historical"},{"label":"تراجيدي","value":"tragic"},{"label":"جريمة","value":"%d8%ac%d8%b1%d9%8a%d9%85%d8%a9"},{"label":"جندر بندر","value":"%d8%ac%d9%86%d8%af%d8%b1-%d8%a8%d9%86%d8%af%d8%b1"},{"label":"جوسي","value":"josei"},{"label":"حريم","value":"harem"},{"label":"خارق للطبيعة","value":"supernatural"},{"label":"خيال","value":"fantasy"},{"label":"خيال علمي","value":"sci-fi"},{"label":"دراما","value":"drama"},{"label":"دموي","value":"%d8%af%d9%85%d9%88%d9%8a"},{"label":"راشد","value":"mature"},{"label":"رعب","value":"horror"},{"label":"رومانسي","value":"romance"},{"label":"رياضة","value":"sports"},{"label":"زمنكاني","value":"my-time"},{"label":"زومبي","value":"%d8%b2%d9%88%d9%85%d8%a8%d9%8a"},{"label":"سينين","value":"seinen"},{"label":"شريحة من الحياة","value":"%d8%b4%d8%b1%d9%8a%d8%ad%d8%a9-%d9%85%d9%86-%d8%a7%d9%84%d8%ad%d9%8a%d8%a7%d8%a9"},{"label":"شوجو","value":"shoujo"},{"label":"شونين","value":"shounen"},{"label":"طبي","value":"%d8%b7%d8%a8%d9%8a"},{"label":"غموض","value":"ambiguity"},{"label":"فنون قتالية","value":"martial-arts"},{"label":"قوة خارقة","value":"superpower"},{"label":"كوميدي","value":"comedy"},{"label":"مغامرات","value":"adventure"},{"label":"نفسي","value":"psychological"}],"inputType":"Picker"}],"options":{"path":{"novels":"serie","novel":"serie","chapter":"serie","genres":"manga-genre"},"useNewChapterEndpoint":true,"lang":"Arabic"}});
|
||||
const plugin = new MadaraPlugin({"id":"hizomanga","sourceSite":"https://hizomanga.com/","sourceName":"HizoManga","filters":[{"key":"sort","label":"ترتيب حسب","values":[{"label":"A-Z","value":"alphabet"},{"label":"New","value":"new-manga"},{"label":"الأحدث","value":"latest"},{"label":"الأكثر مشاهدة","value":"views"},{"label":"التقييم","value":"rating"},{"label":"الرائج","value":"trending"}],"inputType":1},{"key":"genres","label":"التصنيفات","values":[{"label":"آلات","value":"mechanisms"},{"label":"أكشن","value":"action"},{"label":"إثارة","value":"excitement"},{"label":"إيسكاي","value":"%d8%a5%d9%8a%d8%b3%d9%83%d8%a7%d9%8a"},{"label":"الحياة اليومية","value":"slice-of-life"},{"label":"الحياة مدرسية","value":"school-life"},{"label":"تاريخي","value":"historical"},{"label":"تراجيدي","value":"tragic"},{"label":"جريمة","value":"%d8%ac%d8%b1%d9%8a%d9%85%d8%a9"},{"label":"جندر بندر","value":"%d8%ac%d9%86%d8%af%d8%b1-%d8%a8%d9%86%d8%af%d8%b1"},{"label":"جوسي","value":"josei"},{"label":"حريم","value":"harem"},{"label":"خارق للطبيعة","value":"supernatural"},{"label":"خيال","value":"fantasy"},{"label":"خيال علمي","value":"sci-fi"},{"label":"دراما","value":"drama"},{"label":"دموي","value":"%d8%af%d9%85%d9%88%d9%8a"},{"label":"راشد","value":"mature"},{"label":"رعب","value":"horror"},{"label":"رومانسي","value":"romance"},{"label":"رياضة","value":"sports"},{"label":"زمنكاني","value":"my-time"},{"label":"زومبي","value":"%d8%b2%d9%88%d9%85%d8%a8%d9%8a"},{"label":"سينين","value":"seinen"},{"label":"شريحة من الحياة","value":"%d8%b4%d8%b1%d9%8a%d8%ad%d8%a9-%d9%85%d9%86-%d8%a7%d9%84%d8%ad%d9%8a%d8%a7%d8%a9"},{"label":"شوجو","value":"shoujo"},{"label":"شونين","value":"shounen"},{"label":"طبي","value":"%d8%b7%d8%a8%d9%8a"},{"label":"غموض","value":"ambiguity"},{"label":"فنون قتالية","value":"martial-arts"},{"label":"قوة خارقة","value":"superpower"},{"label":"كوميدي","value":"comedy"},{"label":"مغامرات","value":"adventure"},{"label":"نفسي","value":"psychological"}],"inputType":1}],"options":{"path":{"novels":"serie","novel":"serie","chapter":"serie","genres":"manga-genre"},"useNewChapterEndpoint":true,"lang":"Arabic"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
@@ -247,6 +247,6 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"novel4up","sourceSite":"https://novel4up.com/","sourceName":"Novel4Up","filters":[{"key":"sort","label":"ترتيب حسب:","values":[{"label":"أ-ي","value":"alphabet"},{"label":"الأحدث","value":"latest"},{"label":"الأكثر مشاهدة","value":"views"},{"label":"التقييم","value":"rating"},{"label":"الجديد","value":"new-manga"},{"label":"الشائع","value":"trending"}],"inputType":"Picker"},{"key":"genres","label":"التصنيفات","values":[{"label":"أكشن","value":"action"},{"label":"الخارق للطبيعة","value":"supernatural"},{"label":"تاريخي","value":"historical"},{"label":"تحقيق","value":"detective"},{"label":"تراجيديا","value":"tragedy"},{"label":"حريم","value":"harem"},{"label":"حياة مدرسية","value":"school-life"},{"label":"خيال علمي","value":"sci-fi"},{"label":"دراما","value":"drama"},{"label":"رعب","value":"horror"},{"label":"رومانسي","value":"romance"},{"label":"رياضة","value":"sports"},{"label":"سحر","value":"magic"},{"label":"شريحة من الحياة","value":"slice-of-life"},{"label":"شوانهوا","value":"xuanhuan"},{"label":"شوجو","value":"shoujo"},{"label":"شونين","value":"shounen"},{"label":"غموض","value":"mystery"},{"label":"فانتازيا","value":"fantasy"},{"label":"فنون قتال","value":"martial-arts"},{"label":"كوميديا","value":"comedy"},{"label":"مغامرة","value":"adventure"},{"label":"ميكا","value":"mecha"},{"label":"نفسي","value":"psychological"},{"label":"ون شوت","value":"one-shot"},{"label":"ووشيا","value":"wuxia"}],"inputType":"Picker"}],"options":{"lang":"Arabic"}});
|
||||
const plugin = new MadaraPlugin({"id":"novel4up","sourceSite":"https://novel4up.com/","sourceName":"Novel4Up","filters":[{"key":"sort","label":"ترتيب حسب:","values":[{"label":"أ-ي","value":"alphabet"},{"label":"الأحدث","value":"latest"},{"label":"الأكثر مشاهدة","value":"views"},{"label":"التقييم","value":"rating"},{"label":"الجديد","value":"new-manga"},{"label":"الشائع","value":"trending"}],"inputType":1},{"key":"genres","label":"التصنيفات","values":[{"label":"أكشن","value":"action"},{"label":"الخارق للطبيعة","value":"supernatural"},{"label":"تاريخي","value":"historical"},{"label":"تحقيق","value":"detective"},{"label":"تراجيديا","value":"tragedy"},{"label":"حريم","value":"harem"},{"label":"حياة مدرسية","value":"school-life"},{"label":"خيال علمي","value":"sci-fi"},{"label":"دراما","value":"drama"},{"label":"رعب","value":"horror"},{"label":"رومانسي","value":"romance"},{"label":"رياضة","value":"sports"},{"label":"سحر","value":"magic"},{"label":"شريحة من الحياة","value":"slice-of-life"},{"label":"شوانهوا","value":"xuanhuan"},{"label":"شوجو","value":"shoujo"},{"label":"شونين","value":"shounen"},{"label":"غموض","value":"mystery"},{"label":"فانتازيا","value":"fantasy"},{"label":"فنون قتال","value":"martial-arts"},{"label":"كوميديا","value":"comedy"},{"label":"مغامرة","value":"adventure"},{"label":"ميكا","value":"mecha"},{"label":"نفسي","value":"psychological"},{"label":"ون شوت","value":"one-shot"},{"label":"ووشيا","value":"wuxia"}],"inputType":1}],"options":{"lang":"Arabic"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
@@ -247,6 +247,6 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"riwyat","sourceSite":"https://riwyat.com/","sourceName":"Riwyat","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":"Picker"},{"key":"genres","label":"GENRES","values":[{"label":"أكشن","value":"%d8%a3%d9%83%d8%b4%d9%86"},{"label":"أيتشي","value":"%d8%a3%d9%8a%d8%aa%d8%b4%d9%8a"},{"label":"استراتجي","value":"%d8%a7%d8%b3%d8%aa%d8%b1%d8%a7%d8%aa%d8%ac%d9%8a"},{"label":"العصر الحديث","value":"%d8%a7%d9%84%d8%b9%d8%b5%d8%b1-%d8%a7%d9%84%d8%ad%d8%af%d9%8a%d8%ab"},{"label":"انتقام","value":"%d8%a7%d9%86%d8%aa%d9%82%d8%a7%d9%85"},{"label":"بالغ","value":"%d8%a8%d8%a7%d9%84%d8%ba"},{"label":"بناء مملكة","value":"%d8%a8%d9%86%d8%a7%d8%a1-%d9%85%d9%85%d9%84%d9%83%d8%a9"},{"label":"بوليسي","value":"%d8%a8%d9%88%d9%84%d9%8a%d8%b3%d9%8a"},{"label":"تاريخي","value":"%d8%aa%d8%a7%d8%b1%d9%8a%d8%ae%d9%8a"},{"label":"جوسي","value":"%d8%ac%d9%88%d8%b3%d9%8a"},{"label":"حريم","value":"%d8%ad%d8%b1%d9%8a%d9%85"},{"label":"حياة يومية","value":"%d8%ad%d9%8a%d8%a7%d8%a9-%d9%8a%d9%88%d9%85%d9%8a%d8%a9"},{"label":"خيال","value":"%d8%ae%d9%8a%d8%a7%d9%84"},{"label":"خيال علمي","value":"%d8%ae%d9%8a%d8%a7%d9%84-%d8%b9%d9%84%d9%85%d9%8a"},{"label":"دراما","value":"%d8%af%d8%b1%d8%a7%d9%85%d8%a7"},{"label":"رعب","value":"%d8%b1%d8%b9%d8%a8"},{"label":"رومانسية","value":"%d8%b1%d9%88%d9%85%d8%a7%d9%86%d8%b3%d9%8a%d8%a9"},{"label":"رياضي","value":"%d8%b1%d9%8a%d8%a7%d8%b6%d9%8a"},{"label":"زيانشيا","value":"xianxia"},{"label":"سنين","value":"%d8%b3%d9%86%d9%8a%d9%86"},{"label":"شريحة حياة","value":"%d8%b4%d8%b1%d9%8a%d8%ad%d8%a9-%d8%ad%d9%8a%d8%a7%d8%a9"},{"label":"شوانهوان","value":"xuanhuan"},{"label":"شوجو","value":"%d8%b4%d9%88%d8%ac%d9%88"},{"label":"شونين","value":"%d8%b4%d9%88%d9%86%d9%8a%d9%86"},{"label":"شيانشيا","value":"%d8%b4%d9%8a%d8%a7%d9%86%d8%b4%d9%8a%d8%a7"},{"label":"عسكري","value":"%d8%b9%d8%b3%d9%83%d8%b1%d9%8a"},{"label":"غموض","value":"%d8%ba%d9%85%d9%88%d8%b6"},{"label":"فانتازيا","value":"%d9%81%d8%a7%d9%86%d8%aa%d8%a7%d8%b2%d9%8a%d8%a7"},{"label":"فنون قتالية","value":"%d9%81%d9%86%d9%88%d9%86-%d9%82%d8%aa%d8%a7%d9%84%d9%8a%d8%a9"},{"label":"قوى خارقة","value":"%d9%82%d9%88%d9%89-%d8%ae%d8%a7%d8%b1%d9%82%d8%a9"},{"label":"كوميديا","value":"%d9%83%d9%88%d9%85%d9%8a%d8%af%d9%8a%d8%a7"},{"label":"كوميك","value":"%d9%83%d9%88%d9%85%d9%8a%d9%83"},{"label":"للكبار","value":"%d9%84%d9%84%d9%83%d8%a8%d8%a7%d8%b1"},{"label":"مأساة","value":"%d9%85%d8%a3%d8%b3%d8%a7%d8%a9"},{"label":"مانجا","value":"%d9%85%d8%a7%d9%86%d8%ac%d8%a7"},{"label":"مانها","value":"%d9%85%d8%a7%d9%86%d9%87%d8%a7"},{"label":"مانهوا","value":"%d9%85%d8%a7%d9%86%d9%87%d9%88%d8%a7"},{"label":"مدرسي","value":"%d9%85%d8%af%d8%b1%d8%b3%d9%8a"},{"label":"مصاصي دماء","value":"%d9%85%d8%b5%d8%a7%d8%b5%d9%8a-%d8%af%d9%85%d8%a7%d8%a1"},{"label":"مغامرة","value":"%d9%85%d8%ba%d8%a7%d9%85%d8%b1%d8%a9"},{"label":"مكتملة","value":"%d9%85%d9%83%d8%aa%d9%85%d9%84%d8%a9"},{"label":"نفسي","value":"%d9%86%d9%81%d8%b3%d9%8a"},{"label":"نهاية العالم","value":"%d9%86%d9%87%d8%a7%d9%8a%d8%a9-%d8%a7%d9%84%d8%b9%d8%a7%d9%84%d9%85"},{"label":"واب تون","value":"%d9%88%d8%a7%d8%a8-%d8%aa%d9%88%d9%86"},{"label":"وان شوت","value":"%d9%88%d8%a7%d9%86-%d8%b4%d9%88%d8%aa"}],"inputType":"Picker"}],"options":{"useNewChapterEndpoint":true,"lang":"Arabic"}});
|
||||
const plugin = new MadaraPlugin({"id":"riwyat","sourceSite":"https://riwyat.com/","sourceName":"Riwyat","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":1},{"key":"genres","label":"GENRES","values":[{"label":"أكشن","value":"%d8%a3%d9%83%d8%b4%d9%86"},{"label":"أيتشي","value":"%d8%a3%d9%8a%d8%aa%d8%b4%d9%8a"},{"label":"استراتجي","value":"%d8%a7%d8%b3%d8%aa%d8%b1%d8%a7%d8%aa%d8%ac%d9%8a"},{"label":"العصر الحديث","value":"%d8%a7%d9%84%d8%b9%d8%b5%d8%b1-%d8%a7%d9%84%d8%ad%d8%af%d9%8a%d8%ab"},{"label":"انتقام","value":"%d8%a7%d9%86%d8%aa%d9%82%d8%a7%d9%85"},{"label":"بالغ","value":"%d8%a8%d8%a7%d9%84%d8%ba"},{"label":"بناء مملكة","value":"%d8%a8%d9%86%d8%a7%d8%a1-%d9%85%d9%85%d9%84%d9%83%d8%a9"},{"label":"بوليسي","value":"%d8%a8%d9%88%d9%84%d9%8a%d8%b3%d9%8a"},{"label":"تاريخي","value":"%d8%aa%d8%a7%d8%b1%d9%8a%d8%ae%d9%8a"},{"label":"جوسي","value":"%d8%ac%d9%88%d8%b3%d9%8a"},{"label":"حريم","value":"%d8%ad%d8%b1%d9%8a%d9%85"},{"label":"حياة يومية","value":"%d8%ad%d9%8a%d8%a7%d8%a9-%d9%8a%d9%88%d9%85%d9%8a%d8%a9"},{"label":"خيال","value":"%d8%ae%d9%8a%d8%a7%d9%84"},{"label":"خيال علمي","value":"%d8%ae%d9%8a%d8%a7%d9%84-%d8%b9%d9%84%d9%85%d9%8a"},{"label":"دراما","value":"%d8%af%d8%b1%d8%a7%d9%85%d8%a7"},{"label":"رعب","value":"%d8%b1%d8%b9%d8%a8"},{"label":"رومانسية","value":"%d8%b1%d9%88%d9%85%d8%a7%d9%86%d8%b3%d9%8a%d8%a9"},{"label":"رياضي","value":"%d8%b1%d9%8a%d8%a7%d8%b6%d9%8a"},{"label":"زيانشيا","value":"xianxia"},{"label":"سنين","value":"%d8%b3%d9%86%d9%8a%d9%86"},{"label":"شريحة حياة","value":"%d8%b4%d8%b1%d9%8a%d8%ad%d8%a9-%d8%ad%d9%8a%d8%a7%d8%a9"},{"label":"شوانهوان","value":"xuanhuan"},{"label":"شوجو","value":"%d8%b4%d9%88%d8%ac%d9%88"},{"label":"شونين","value":"%d8%b4%d9%88%d9%86%d9%8a%d9%86"},{"label":"شيانشيا","value":"%d8%b4%d9%8a%d8%a7%d9%86%d8%b4%d9%8a%d8%a7"},{"label":"عسكري","value":"%d8%b9%d8%b3%d9%83%d8%b1%d9%8a"},{"label":"غموض","value":"%d8%ba%d9%85%d9%88%d8%b6"},{"label":"فانتازيا","value":"%d9%81%d8%a7%d9%86%d8%aa%d8%a7%d8%b2%d9%8a%d8%a7"},{"label":"فنون قتالية","value":"%d9%81%d9%86%d9%88%d9%86-%d9%82%d8%aa%d8%a7%d9%84%d9%8a%d8%a9"},{"label":"قوى خارقة","value":"%d9%82%d9%88%d9%89-%d8%ae%d8%a7%d8%b1%d9%82%d8%a9"},{"label":"كوميديا","value":"%d9%83%d9%88%d9%85%d9%8a%d8%af%d9%8a%d8%a7"},{"label":"كوميك","value":"%d9%83%d9%88%d9%85%d9%8a%d9%83"},{"label":"للكبار","value":"%d9%84%d9%84%d9%83%d8%a8%d8%a7%d8%b1"},{"label":"مأساة","value":"%d9%85%d8%a3%d8%b3%d8%a7%d8%a9"},{"label":"مانجا","value":"%d9%85%d8%a7%d9%86%d8%ac%d8%a7"},{"label":"مانها","value":"%d9%85%d8%a7%d9%86%d9%87%d8%a7"},{"label":"مانهوا","value":"%d9%85%d8%a7%d9%86%d9%87%d9%88%d8%a7"},{"label":"مدرسي","value":"%d9%85%d8%af%d8%b1%d8%b3%d9%8a"},{"label":"مصاصي دماء","value":"%d9%85%d8%b5%d8%a7%d8%b5%d9%8a-%d8%af%d9%85%d8%a7%d8%a1"},{"label":"مغامرة","value":"%d9%85%d8%ba%d8%a7%d9%85%d8%b1%d8%a9"},{"label":"مكتملة","value":"%d9%85%d9%83%d8%aa%d9%85%d9%84%d8%a9"},{"label":"نفسي","value":"%d9%86%d9%81%d8%b3%d9%8a"},{"label":"نهاية العالم","value":"%d9%86%d9%87%d8%a7%d9%8a%d8%a9-%d8%a7%d9%84%d8%b9%d8%a7%d9%84%d9%85"},{"label":"واب تون","value":"%d9%88%d8%a7%d8%a8-%d8%aa%d9%88%d9%86"},{"label":"وان شوت","value":"%d9%88%d8%a7%d9%86-%d8%b4%d9%88%d8%aa"}],"inputType":1}],"options":{"useNewChapterEndpoint":true,"lang":"Arabic"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
@@ -247,6 +247,6 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"boxnovel","sourceSite":"https://boxnovel.com/","sourceName":"BoxNovel","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":"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":"Picker"}],"options":{"path":{"genres":"manga-genre"},"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
const plugin = new MadaraPlugin({"id":"boxnovel","sourceSite":"https://boxnovel.com/","sourceName":"BoxNovel","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":1},{"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":1}],"options":{"path":{"genres":"manga-genre"},"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -1,252 +0,0 @@
|
||||
|
||||
import { fetchApi, fetchFile } from "@libs/fetch";
|
||||
import { Filter } from "@libs/filterInputs";
|
||||
import { Plugin } from '@typings/plugin'
|
||||
import { load as parseHTML } from "cheerio";
|
||||
import { defaultCover } from "@libs/defaultCover";
|
||||
import { NovelStatus } from "@libs/novelStatus";
|
||||
import { parseMadaraDate } from "@libs/parseMadaraDate";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
interface MadaraOptionPath{
|
||||
genres?: string,
|
||||
novels?: string,
|
||||
novel?: string,
|
||||
chapter?: string,
|
||||
}
|
||||
|
||||
const MadaraDefaultPath: MadaraOptionPath = {
|
||||
novels: 'novel',
|
||||
novel: 'novel',
|
||||
chapter: 'novel'
|
||||
}
|
||||
|
||||
interface MadaraOptions {
|
||||
useNewChapterEndpoint?: boolean,
|
||||
path?: MadaraOptionPath,
|
||||
lang?: string,
|
||||
orderBy?: string
|
||||
}
|
||||
|
||||
export interface MadaraMetadata {
|
||||
id: string,
|
||||
sourceSite: string,
|
||||
sourceName: string,
|
||||
options?: MadaraOptions,
|
||||
filters?: Filter[],
|
||||
}
|
||||
class MadaraPlugin implements Plugin.PluginBase {
|
||||
id: string;
|
||||
name: string;
|
||||
icon: string;
|
||||
site: string;
|
||||
version: string;
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
this.name = metadata.sourceName + "[madara]";
|
||||
const iconFileName = metadata.sourceName.replace(/\s+/g, "").toLowerCase();
|
||||
this.icon = `multisrc/madara/icons/${iconFileName}.png`;
|
||||
this.site = metadata.sourceSite;
|
||||
this.version = "1.0.0";
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.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 () {
|
||||
const novelName = loadedCheerio(this).find('.post-title').text().trim();
|
||||
let image = loadedCheerio(this).find('img');
|
||||
const novelCover = image.attr('data-src') || image.attr('src');
|
||||
|
||||
let novelUrl = loadedCheerio(this).find('.post-title')
|
||||
.find('a')
|
||||
.attr('href') || '';
|
||||
const novel: Plugin.NovelItem = {
|
||||
name: novelName,
|
||||
cover: novelCover,
|
||||
url: novelUrl,
|
||||
};
|
||||
|
||||
novels.push(novel);
|
||||
});
|
||||
|
||||
return novels;
|
||||
}
|
||||
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> {
|
||||
const novel: Plugin.SourceNovel = {
|
||||
url: novelUrl,
|
||||
};
|
||||
|
||||
const body = await fetchApi(novelUrl).then(res => res.text());
|
||||
|
||||
let loadedCheerio = parseHTML(body);
|
||||
|
||||
loadedCheerio('.manga-title-badges, #manga-title span').remove();
|
||||
novel.name =
|
||||
loadedCheerio('.post-title h1').text().trim() ||
|
||||
loadedCheerio('#manga-title h1').text();
|
||||
|
||||
novel.cover =
|
||||
loadedCheerio('.summary_image > a > img').attr('data-lazy-src') ||
|
||||
loadedCheerio('.summary_image > a > img').attr('data-src') ||
|
||||
loadedCheerio('.summary_image > a > img').attr('src') ||
|
||||
defaultCover;
|
||||
|
||||
loadedCheerio('.post-content_item, .post-content').each(function () {
|
||||
const detailName = loadedCheerio(this).find('h5').text().trim();
|
||||
const detail = loadedCheerio(this).find('.summary-content').text().trim();
|
||||
|
||||
switch (detailName) {
|
||||
case 'Genre(s)':
|
||||
case 'التصنيفات':
|
||||
novel.genres = detail.replace(/[\\t\\n]/g, ',');
|
||||
break;
|
||||
case 'Author(s)':
|
||||
case 'المؤلف':
|
||||
case 'المؤلف (ين)':
|
||||
novel.author = detail;
|
||||
break;
|
||||
case 'Status':
|
||||
case 'الحالة':
|
||||
novel.status =
|
||||
detail.includes('OnGoing') || detail.includes('مستمرة')
|
||||
? NovelStatus.Ongoing
|
||||
: NovelStatus.Completed;
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
loadedCheerio('div.summary__content .code-block,script').remove();
|
||||
novel.summary =
|
||||
loadedCheerio('div.summary__content').text().trim() ||
|
||||
loadedCheerio('#tab-manga-about').text().trim() ||
|
||||
loadedCheerio('.post-content_item h5:contains("Summary")').next().text().trim();
|
||||
|
||||
let html;
|
||||
|
||||
if (this.options?.useNewChapterEndpoint !== true) {
|
||||
const novelId =
|
||||
loadedCheerio('.rating-post-id').attr('value') ||
|
||||
loadedCheerio('#manga-chapters-holder').attr('data-id') || '';
|
||||
|
||||
const formData = new FormData()
|
||||
formData.append("action", "manga_get_chapters");
|
||||
formData.append("manga", novelId);
|
||||
|
||||
html = await fetchApi(
|
||||
this.site + 'wp-admin/admin-ajax.php',
|
||||
{
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
})
|
||||
.then(res => res.text());
|
||||
} else {
|
||||
html = await fetchApi(
|
||||
novelUrl + 'ajax/chapters/',
|
||||
{ method: 'POST' })
|
||||
.then(res => res.text());
|
||||
}
|
||||
|
||||
if (html !== '0') {
|
||||
loadedCheerio = parseHTML(html);
|
||||
}
|
||||
|
||||
const chapters: Plugin.ChapterItem[] = [];
|
||||
loadedCheerio('.wp-manga-chapter').each(function () {
|
||||
const chapterName = loadedCheerio(this).find('a').text().trim();
|
||||
|
||||
let releaseDate = null;
|
||||
releaseDate = loadedCheerio(this)
|
||||
.find('span.chapter-release-date')
|
||||
.text()
|
||||
.trim();
|
||||
|
||||
if (releaseDate) {
|
||||
releaseDate = parseMadaraDate(releaseDate);
|
||||
} else {
|
||||
/**
|
||||
* Insert current date
|
||||
*/
|
||||
|
||||
releaseDate = dayjs().format('LL');
|
||||
}
|
||||
|
||||
let chapterUrl = loadedCheerio(this).find('a').attr('href') || '';
|
||||
|
||||
chapters.push({ name: chapterName, releaseTime: releaseDate, url: chapterUrl });
|
||||
});
|
||||
|
||||
novel.chapters = chapters.reverse();
|
||||
return novel;
|
||||
}
|
||||
async parseChapter(chapterUrl: string): Promise<string> {
|
||||
const body = await fetchApi(chapterUrl).then(res => res.text());
|
||||
|
||||
const loadedCheerio = parseHTML(body);
|
||||
const chapterText =
|
||||
loadedCheerio('.text-left').html() ||
|
||||
loadedCheerio('.text-right').html() ||
|
||||
loadedCheerio('.entry-content').html() || "";
|
||||
|
||||
return chapterText;
|
||||
}
|
||||
async searchNovels(searchTerm: string, pageNo?: number | undefined): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
const url = this.site + "?s=" + searchTerm + "&post_type=wp-manga";
|
||||
|
||||
const body = await fetchApi(url).then(res => res.text());
|
||||
|
||||
const loadedCheerio = parseHTML(body);
|
||||
|
||||
|
||||
loadedCheerio('.c-tabs-item__content').each(function () {
|
||||
const novelName = loadedCheerio(this).find('.post-title').text().trim();
|
||||
|
||||
let image = loadedCheerio(this).find('img');
|
||||
const novelCover = image.attr('data-src') || image.attr('src');
|
||||
|
||||
let novelUrl = loadedCheerio(this)
|
||||
.find('.post-title')
|
||||
.find('a')
|
||||
.attr('href') || '';
|
||||
const novel = {
|
||||
name: novelName,
|
||||
cover: novelCover,
|
||||
url: novelUrl,
|
||||
};
|
||||
|
||||
novels.push(novel);
|
||||
});
|
||||
return novels;
|
||||
}
|
||||
async fetchImage(url: string): Promise<string | undefined> {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"clicknovel","sourceSite":"https://clicknovel.net/","sourceName":"ClickNovel","filters":[],"options":{"lang":"English"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -1,252 +0,0 @@
|
||||
|
||||
import { fetchApi, fetchFile } from "@libs/fetch";
|
||||
import { Filter } from "@libs/filterInputs";
|
||||
import { Plugin } from '@typings/plugin'
|
||||
import { load as parseHTML } from "cheerio";
|
||||
import { defaultCover } from "@libs/defaultCover";
|
||||
import { NovelStatus } from "@libs/novelStatus";
|
||||
import { parseMadaraDate } from "@libs/parseMadaraDate";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
interface MadaraOptionPath{
|
||||
genres?: string,
|
||||
novels?: string,
|
||||
novel?: string,
|
||||
chapter?: string,
|
||||
}
|
||||
|
||||
const MadaraDefaultPath: MadaraOptionPath = {
|
||||
novels: 'novel',
|
||||
novel: 'novel',
|
||||
chapter: 'novel'
|
||||
}
|
||||
|
||||
interface MadaraOptions {
|
||||
useNewChapterEndpoint?: boolean,
|
||||
path?: MadaraOptionPath,
|
||||
lang?: string,
|
||||
orderBy?: string
|
||||
}
|
||||
|
||||
export interface MadaraMetadata {
|
||||
id: string,
|
||||
sourceSite: string,
|
||||
sourceName: string,
|
||||
options?: MadaraOptions,
|
||||
filters?: Filter[],
|
||||
}
|
||||
class MadaraPlugin implements Plugin.PluginBase {
|
||||
id: string;
|
||||
name: string;
|
||||
icon: string;
|
||||
site: string;
|
||||
version: string;
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
this.name = metadata.sourceName + "[madara]";
|
||||
const iconFileName = metadata.sourceName.replace(/\s+/g, "").toLowerCase();
|
||||
this.icon = `multisrc/madara/icons/${iconFileName}.png`;
|
||||
this.site = metadata.sourceSite;
|
||||
this.version = "1.0.0";
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.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 () {
|
||||
const novelName = loadedCheerio(this).find('.post-title').text().trim();
|
||||
let image = loadedCheerio(this).find('img');
|
||||
const novelCover = image.attr('data-src') || image.attr('src');
|
||||
|
||||
let novelUrl = loadedCheerio(this).find('.post-title')
|
||||
.find('a')
|
||||
.attr('href') || '';
|
||||
const novel: Plugin.NovelItem = {
|
||||
name: novelName,
|
||||
cover: novelCover,
|
||||
url: novelUrl,
|
||||
};
|
||||
|
||||
novels.push(novel);
|
||||
});
|
||||
|
||||
return novels;
|
||||
}
|
||||
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> {
|
||||
const novel: Plugin.SourceNovel = {
|
||||
url: novelUrl,
|
||||
};
|
||||
|
||||
const body = await fetchApi(novelUrl).then(res => res.text());
|
||||
|
||||
let loadedCheerio = parseHTML(body);
|
||||
|
||||
loadedCheerio('.manga-title-badges, #manga-title span').remove();
|
||||
novel.name =
|
||||
loadedCheerio('.post-title h1').text().trim() ||
|
||||
loadedCheerio('#manga-title h1').text();
|
||||
|
||||
novel.cover =
|
||||
loadedCheerio('.summary_image > a > img').attr('data-lazy-src') ||
|
||||
loadedCheerio('.summary_image > a > img').attr('data-src') ||
|
||||
loadedCheerio('.summary_image > a > img').attr('src') ||
|
||||
defaultCover;
|
||||
|
||||
loadedCheerio('.post-content_item, .post-content').each(function () {
|
||||
const detailName = loadedCheerio(this).find('h5').text().trim();
|
||||
const detail = loadedCheerio(this).find('.summary-content').text().trim();
|
||||
|
||||
switch (detailName) {
|
||||
case 'Genre(s)':
|
||||
case 'التصنيفات':
|
||||
novel.genres = detail.replace(/[\\t\\n]/g, ',');
|
||||
break;
|
||||
case 'Author(s)':
|
||||
case 'المؤلف':
|
||||
case 'المؤلف (ين)':
|
||||
novel.author = detail;
|
||||
break;
|
||||
case 'Status':
|
||||
case 'الحالة':
|
||||
novel.status =
|
||||
detail.includes('OnGoing') || detail.includes('مستمرة')
|
||||
? NovelStatus.Ongoing
|
||||
: NovelStatus.Completed;
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
loadedCheerio('div.summary__content .code-block,script').remove();
|
||||
novel.summary =
|
||||
loadedCheerio('div.summary__content').text().trim() ||
|
||||
loadedCheerio('#tab-manga-about').text().trim() ||
|
||||
loadedCheerio('.post-content_item h5:contains("Summary")').next().text().trim();
|
||||
|
||||
let html;
|
||||
|
||||
if (this.options?.useNewChapterEndpoint !== true) {
|
||||
const novelId =
|
||||
loadedCheerio('.rating-post-id').attr('value') ||
|
||||
loadedCheerio('#manga-chapters-holder').attr('data-id') || '';
|
||||
|
||||
const formData = new FormData()
|
||||
formData.append("action", "manga_get_chapters");
|
||||
formData.append("manga", novelId);
|
||||
|
||||
html = await fetchApi(
|
||||
this.site + 'wp-admin/admin-ajax.php',
|
||||
{
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
})
|
||||
.then(res => res.text());
|
||||
} else {
|
||||
html = await fetchApi(
|
||||
novelUrl + 'ajax/chapters/',
|
||||
{ method: 'POST' })
|
||||
.then(res => res.text());
|
||||
}
|
||||
|
||||
if (html !== '0') {
|
||||
loadedCheerio = parseHTML(html);
|
||||
}
|
||||
|
||||
const chapters: Plugin.ChapterItem[] = [];
|
||||
loadedCheerio('.wp-manga-chapter').each(function () {
|
||||
const chapterName = loadedCheerio(this).find('a').text().trim();
|
||||
|
||||
let releaseDate = null;
|
||||
releaseDate = loadedCheerio(this)
|
||||
.find('span.chapter-release-date')
|
||||
.text()
|
||||
.trim();
|
||||
|
||||
if (releaseDate) {
|
||||
releaseDate = parseMadaraDate(releaseDate);
|
||||
} else {
|
||||
/**
|
||||
* Insert current date
|
||||
*/
|
||||
|
||||
releaseDate = dayjs().format('LL');
|
||||
}
|
||||
|
||||
let chapterUrl = loadedCheerio(this).find('a').attr('href') || '';
|
||||
|
||||
chapters.push({ name: chapterName, releaseTime: releaseDate, url: chapterUrl });
|
||||
});
|
||||
|
||||
novel.chapters = chapters.reverse();
|
||||
return novel;
|
||||
}
|
||||
async parseChapter(chapterUrl: string): Promise<string> {
|
||||
const body = await fetchApi(chapterUrl).then(res => res.text());
|
||||
|
||||
const loadedCheerio = parseHTML(body);
|
||||
const chapterText =
|
||||
loadedCheerio('.text-left').html() ||
|
||||
loadedCheerio('.text-right').html() ||
|
||||
loadedCheerio('.entry-content').html() || "";
|
||||
|
||||
return chapterText;
|
||||
}
|
||||
async searchNovels(searchTerm: string, pageNo?: number | undefined): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
const url = this.site + "?s=" + searchTerm + "&post_type=wp-manga";
|
||||
|
||||
const body = await fetchApi(url).then(res => res.text());
|
||||
|
||||
const loadedCheerio = parseHTML(body);
|
||||
|
||||
|
||||
loadedCheerio('.c-tabs-item__content').each(function () {
|
||||
const novelName = loadedCheerio(this).find('.post-title').text().trim();
|
||||
|
||||
let image = loadedCheerio(this).find('img');
|
||||
const novelCover = image.attr('data-src') || image.attr('src');
|
||||
|
||||
let novelUrl = loadedCheerio(this)
|
||||
.find('.post-title')
|
||||
.find('a')
|
||||
.attr('href') || '';
|
||||
const novel = {
|
||||
name: novelName,
|
||||
cover: novelCover,
|
||||
url: novelUrl,
|
||||
};
|
||||
|
||||
novels.push(novel);
|
||||
});
|
||||
return novels;
|
||||
}
|
||||
async fetchImage(url: string): Promise<string | undefined> {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"cratenovel","sourceSite":"https://cratenovel.com/","sourceName":"CrateNovel","filters":[],"options":{"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
@@ -247,6 +247,6 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"daonovel","sourceSite":"https://daonovel.com/","sourceName":"DaoNovel","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":"Picker"}],"options":{"path":{"novels":"novels-list","novel":"novels","chapter":"novels"},"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
const plugin = new MadaraPlugin({"id":"daonovel","sourceSite":"https://daonovel.com/","sourceName":"DaoNovel","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":1}],"options":{"path":{"novels":"novels-list","novel":"novels","chapter":"novels"},"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
@@ -247,6 +247,6 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"fanTLS","sourceSite":"https://fanstranslations.com/","sourceName":"Fans Translations","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":"Picker"}],"options":{"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
const plugin = new MadaraPlugin({"id":"fanTLS","sourceSite":"https://fanstranslations.com/","sourceName":"Fans Translations","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":1}],"options":{"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
@@ -247,6 +247,6 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"1stkissnovel","sourceSite":"https://1stkissnovel.org/","sourceName":"FirstKissNovel","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":"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":"Picker"}],"options":{"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
const plugin = new MadaraPlugin({"id":"1stkissnovel","sourceSite":"https://1stkissnovel.org/","sourceName":"FirstKissNovel","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":1},{"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":1}],"options":{"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
@@ -247,6 +247,6 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"freenovel.me","sourceSite":"https://freenovel.me/","sourceName":"FreeNovelMe","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":"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":"Picker"}],"options":{"lang":"English"}});
|
||||
const plugin = new MadaraPlugin({"id":"freenovel.me","sourceSite":"https://freenovel.me/","sourceName":"FreeNovelMe","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":1},{"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":1}],"options":{"lang":"English"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
@@ -247,6 +247,6 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"guavaread","sourceSite":"https://guavaread.com/","sourceName":"Guavaread","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":"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":"Picker"}],"options":{"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
const plugin = new MadaraPlugin({"id":"guavaread","sourceSite":"https://guavaread.com/","sourceName":"Guavaread","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":1},{"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":1}],"options":{"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
@@ -247,6 +247,6 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"lnheaven","sourceSite":"https://lightnovelheaven.com/","sourceName":"LightNovelHeaven","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":"Picker"}],"options":{"path":{"novels":"series","novel":"series","chapter":"series"},"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
const plugin = new MadaraPlugin({"id":"lnheaven","sourceSite":"https://lightnovelheaven.com/","sourceName":"LightNovelHeaven","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":1}],"options":{"path":{"novels":"series","novel":"series","chapter":"series"},"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
export default plugin;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
@@ -247,6 +247,6 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"lunarletters","sourceSite":"https://www.lunarletters.com/","sourceName":"LunarLetters","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":"Picker"}],"options":{"path":{"novels":"series","novel":"series","chapter":"series"},"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
const plugin = new MadaraPlugin({"id":"lunarletters","sourceSite":"https://www.lunarletters.com/","sourceName":"LunarLetters","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":1}],"options":{"path":{"novels":"series","novel":"series","chapter":"series"},"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -1,252 +0,0 @@
|
||||
|
||||
import { fetchApi, fetchFile } from "@libs/fetch";
|
||||
import { Filter } from "@libs/filterInputs";
|
||||
import { Plugin } from '@typings/plugin'
|
||||
import { load as parseHTML } from "cheerio";
|
||||
import { defaultCover } from "@libs/defaultCover";
|
||||
import { NovelStatus } from "@libs/novelStatus";
|
||||
import { parseMadaraDate } from "@libs/parseMadaraDate";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
interface MadaraOptionPath{
|
||||
genres?: string,
|
||||
novels?: string,
|
||||
novel?: string,
|
||||
chapter?: string,
|
||||
}
|
||||
|
||||
const MadaraDefaultPath: MadaraOptionPath = {
|
||||
novels: 'novel',
|
||||
novel: 'novel',
|
||||
chapter: 'novel'
|
||||
}
|
||||
|
||||
interface MadaraOptions {
|
||||
useNewChapterEndpoint?: boolean,
|
||||
path?: MadaraOptionPath,
|
||||
lang?: string,
|
||||
orderBy?: string
|
||||
}
|
||||
|
||||
export interface MadaraMetadata {
|
||||
id: string,
|
||||
sourceSite: string,
|
||||
sourceName: string,
|
||||
options?: MadaraOptions,
|
||||
filters?: Filter[],
|
||||
}
|
||||
class MadaraPlugin implements Plugin.PluginBase {
|
||||
id: string;
|
||||
name: string;
|
||||
icon: string;
|
||||
site: string;
|
||||
version: string;
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
this.name = metadata.sourceName + "[madara]";
|
||||
const iconFileName = metadata.sourceName.replace(/\s+/g, "").toLowerCase();
|
||||
this.icon = `multisrc/madara/icons/${iconFileName}.png`;
|
||||
this.site = metadata.sourceSite;
|
||||
this.version = "1.0.0";
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.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 () {
|
||||
const novelName = loadedCheerio(this).find('.post-title').text().trim();
|
||||
let image = loadedCheerio(this).find('img');
|
||||
const novelCover = image.attr('data-src') || image.attr('src');
|
||||
|
||||
let novelUrl = loadedCheerio(this).find('.post-title')
|
||||
.find('a')
|
||||
.attr('href') || '';
|
||||
const novel: Plugin.NovelItem = {
|
||||
name: novelName,
|
||||
cover: novelCover,
|
||||
url: novelUrl,
|
||||
};
|
||||
|
||||
novels.push(novel);
|
||||
});
|
||||
|
||||
return novels;
|
||||
}
|
||||
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> {
|
||||
const novel: Plugin.SourceNovel = {
|
||||
url: novelUrl,
|
||||
};
|
||||
|
||||
const body = await fetchApi(novelUrl).then(res => res.text());
|
||||
|
||||
let loadedCheerio = parseHTML(body);
|
||||
|
||||
loadedCheerio('.manga-title-badges, #manga-title span').remove();
|
||||
novel.name =
|
||||
loadedCheerio('.post-title h1').text().trim() ||
|
||||
loadedCheerio('#manga-title h1').text();
|
||||
|
||||
novel.cover =
|
||||
loadedCheerio('.summary_image > a > img').attr('data-lazy-src') ||
|
||||
loadedCheerio('.summary_image > a > img').attr('data-src') ||
|
||||
loadedCheerio('.summary_image > a > img').attr('src') ||
|
||||
defaultCover;
|
||||
|
||||
loadedCheerio('.post-content_item, .post-content').each(function () {
|
||||
const detailName = loadedCheerio(this).find('h5').text().trim();
|
||||
const detail = loadedCheerio(this).find('.summary-content').text().trim();
|
||||
|
||||
switch (detailName) {
|
||||
case 'Genre(s)':
|
||||
case 'التصنيفات':
|
||||
novel.genres = detail.replace(/[\\t\\n]/g, ',');
|
||||
break;
|
||||
case 'Author(s)':
|
||||
case 'المؤلف':
|
||||
case 'المؤلف (ين)':
|
||||
novel.author = detail;
|
||||
break;
|
||||
case 'Status':
|
||||
case 'الحالة':
|
||||
novel.status =
|
||||
detail.includes('OnGoing') || detail.includes('مستمرة')
|
||||
? NovelStatus.Ongoing
|
||||
: NovelStatus.Completed;
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
loadedCheerio('div.summary__content .code-block,script').remove();
|
||||
novel.summary =
|
||||
loadedCheerio('div.summary__content').text().trim() ||
|
||||
loadedCheerio('#tab-manga-about').text().trim() ||
|
||||
loadedCheerio('.post-content_item h5:contains("Summary")').next().text().trim();
|
||||
|
||||
let html;
|
||||
|
||||
if (this.options?.useNewChapterEndpoint !== true) {
|
||||
const novelId =
|
||||
loadedCheerio('.rating-post-id').attr('value') ||
|
||||
loadedCheerio('#manga-chapters-holder').attr('data-id') || '';
|
||||
|
||||
const formData = new FormData()
|
||||
formData.append("action", "manga_get_chapters");
|
||||
formData.append("manga", novelId);
|
||||
|
||||
html = await fetchApi(
|
||||
this.site + 'wp-admin/admin-ajax.php',
|
||||
{
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
})
|
||||
.then(res => res.text());
|
||||
} else {
|
||||
html = await fetchApi(
|
||||
novelUrl + 'ajax/chapters/',
|
||||
{ method: 'POST' })
|
||||
.then(res => res.text());
|
||||
}
|
||||
|
||||
if (html !== '0') {
|
||||
loadedCheerio = parseHTML(html);
|
||||
}
|
||||
|
||||
const chapters: Plugin.ChapterItem[] = [];
|
||||
loadedCheerio('.wp-manga-chapter').each(function () {
|
||||
const chapterName = loadedCheerio(this).find('a').text().trim();
|
||||
|
||||
let releaseDate = null;
|
||||
releaseDate = loadedCheerio(this)
|
||||
.find('span.chapter-release-date')
|
||||
.text()
|
||||
.trim();
|
||||
|
||||
if (releaseDate) {
|
||||
releaseDate = parseMadaraDate(releaseDate);
|
||||
} else {
|
||||
/**
|
||||
* Insert current date
|
||||
*/
|
||||
|
||||
releaseDate = dayjs().format('LL');
|
||||
}
|
||||
|
||||
let chapterUrl = loadedCheerio(this).find('a').attr('href') || '';
|
||||
|
||||
chapters.push({ name: chapterName, releaseTime: releaseDate, url: chapterUrl });
|
||||
});
|
||||
|
||||
novel.chapters = chapters.reverse();
|
||||
return novel;
|
||||
}
|
||||
async parseChapter(chapterUrl: string): Promise<string> {
|
||||
const body = await fetchApi(chapterUrl).then(res => res.text());
|
||||
|
||||
const loadedCheerio = parseHTML(body);
|
||||
const chapterText =
|
||||
loadedCheerio('.text-left').html() ||
|
||||
loadedCheerio('.text-right').html() ||
|
||||
loadedCheerio('.entry-content').html() || "";
|
||||
|
||||
return chapterText;
|
||||
}
|
||||
async searchNovels(searchTerm: string, pageNo?: number | undefined): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
const url = this.site + "?s=" + searchTerm + "&post_type=wp-manga";
|
||||
|
||||
const body = await fetchApi(url).then(res => res.text());
|
||||
|
||||
const loadedCheerio = parseHTML(body);
|
||||
|
||||
|
||||
loadedCheerio('.c-tabs-item__content').each(function () {
|
||||
const novelName = loadedCheerio(this).find('.post-title').text().trim();
|
||||
|
||||
let image = loadedCheerio(this).find('img');
|
||||
const novelCover = image.attr('data-src') || image.attr('src');
|
||||
|
||||
let novelUrl = loadedCheerio(this)
|
||||
.find('.post-title')
|
||||
.find('a')
|
||||
.attr('href') || '';
|
||||
const novel = {
|
||||
name: novelName,
|
||||
cover: novelCover,
|
||||
url: novelUrl,
|
||||
};
|
||||
|
||||
novels.push(novel);
|
||||
});
|
||||
return novels;
|
||||
}
|
||||
async fetchImage(url: string): Promise<string | undefined> {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"mtlnovel.club","sourceSite":"https://mtlnovel.club/","sourceName":"MTLNovel.Club","filters":[],"options":{"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
@@ -247,6 +247,6 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"mtl-novel","sourceSite":"https://mtl-novel.com/","sourceName":"MTL-Novel","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":"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":"Picker"}],"options":{"path":{"genres":"manga-genre"},"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
const plugin = new MadaraPlugin({"id":"mtl-novel","sourceSite":"https://mtl-novel.com/","sourceName":"MTL-Novel","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":1},{"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":1}],"options":{"path":{"genres":"manga-genre"},"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
@@ -247,6 +247,6 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"mostnovel","sourceSite":"https://mostnovel.com/","sourceName":"MostNovel","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":"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":"Picker"}],"options":{"path":{"novels":"manga","novel":"manga","chapter":"manga","genres":"manga-genre"},"lang":"English"}});
|
||||
const plugin = new MadaraPlugin({"id":"mostnovel","sourceSite":"https://mostnovel.com/","sourceName":"MostNovel","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":1},{"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":1}],"options":{"path":{"novels":"manga","novel":"manga","chapter":"manga","genres":"manga-genre"},"lang":"English"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
@@ -247,6 +247,6 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"mysticalmerries","sourceSite":"https://mysticalmerries.com/","sourceName":"MysticalSeries","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":"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":"Picker"}],"options":{"path":{"novels":"series","novel":"series","chapter":"series","genres":"genre"},"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
const plugin = new MadaraPlugin({"id":"mysticalmerries","sourceSite":"https://mysticalmerries.com/","sourceName":"MysticalSeries","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":1},{"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":1}],"options":{"path":{"novels":"series","novel":"series","chapter":"series","genres":"genre"},"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
@@ -247,6 +247,6 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"neosekaiTLS","sourceSite":"https://www.neosekaitranslations.com/","sourceName":"NeoSekai Translations","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":"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":"Picker"}],"options":{"lang":"English"}});
|
||||
const plugin = new MadaraPlugin({"id":"neosekaiTLS","sourceSite":"https://www.neosekaitranslations.com/","sourceName":"NeoSekai Translations","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":1},{"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":1}],"options":{"lang":"English"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
@@ -247,6 +247,6 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"nocturneTLS","sourceSite":"https://nocturnetls.net/","sourceName":"Nocturne Translations","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":"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":"Picker"}],"options":{"path":{"novels":"novels","novel":"novels","chapter":"novels","genres":"manga-genre"},"lang":"English"}});
|
||||
const plugin = new MadaraPlugin({"id":"nocturneTLS","sourceSite":"https://nocturnetls.net/","sourceName":"Nocturne Translations","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":1},{"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":1}],"options":{"path":{"novels":"novels","novel":"novels","chapter":"novels","genres":"manga-genre"},"lang":"English"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -1,252 +0,0 @@
|
||||
|
||||
import { fetchApi, fetchFile } from "@libs/fetch";
|
||||
import { Filter } from "@libs/filterInputs";
|
||||
import { Plugin } from '@typings/plugin'
|
||||
import { load as parseHTML } from "cheerio";
|
||||
import { defaultCover } from "@libs/defaultCover";
|
||||
import { NovelStatus } from "@libs/novelStatus";
|
||||
import { parseMadaraDate } from "@libs/parseMadaraDate";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
interface MadaraOptionPath{
|
||||
genres?: string,
|
||||
novels?: string,
|
||||
novel?: string,
|
||||
chapter?: string,
|
||||
}
|
||||
|
||||
const MadaraDefaultPath: MadaraOptionPath = {
|
||||
novels: 'novel',
|
||||
novel: 'novel',
|
||||
chapter: 'novel'
|
||||
}
|
||||
|
||||
interface MadaraOptions {
|
||||
useNewChapterEndpoint?: boolean,
|
||||
path?: MadaraOptionPath,
|
||||
lang?: string,
|
||||
orderBy?: string
|
||||
}
|
||||
|
||||
export interface MadaraMetadata {
|
||||
id: string,
|
||||
sourceSite: string,
|
||||
sourceName: string,
|
||||
options?: MadaraOptions,
|
||||
filters?: Filter[],
|
||||
}
|
||||
class MadaraPlugin implements Plugin.PluginBase {
|
||||
id: string;
|
||||
name: string;
|
||||
icon: string;
|
||||
site: string;
|
||||
version: string;
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
this.name = metadata.sourceName + "[madara]";
|
||||
const iconFileName = metadata.sourceName.replace(/\s+/g, "").toLowerCase();
|
||||
this.icon = `multisrc/madara/icons/${iconFileName}.png`;
|
||||
this.site = metadata.sourceSite;
|
||||
this.version = "1.0.0";
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.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 () {
|
||||
const novelName = loadedCheerio(this).find('.post-title').text().trim();
|
||||
let image = loadedCheerio(this).find('img');
|
||||
const novelCover = image.attr('data-src') || image.attr('src');
|
||||
|
||||
let novelUrl = loadedCheerio(this).find('.post-title')
|
||||
.find('a')
|
||||
.attr('href') || '';
|
||||
const novel: Plugin.NovelItem = {
|
||||
name: novelName,
|
||||
cover: novelCover,
|
||||
url: novelUrl,
|
||||
};
|
||||
|
||||
novels.push(novel);
|
||||
});
|
||||
|
||||
return novels;
|
||||
}
|
||||
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> {
|
||||
const novel: Plugin.SourceNovel = {
|
||||
url: novelUrl,
|
||||
};
|
||||
|
||||
const body = await fetchApi(novelUrl).then(res => res.text());
|
||||
|
||||
let loadedCheerio = parseHTML(body);
|
||||
|
||||
loadedCheerio('.manga-title-badges, #manga-title span').remove();
|
||||
novel.name =
|
||||
loadedCheerio('.post-title h1').text().trim() ||
|
||||
loadedCheerio('#manga-title h1').text();
|
||||
|
||||
novel.cover =
|
||||
loadedCheerio('.summary_image > a > img').attr('data-lazy-src') ||
|
||||
loadedCheerio('.summary_image > a > img').attr('data-src') ||
|
||||
loadedCheerio('.summary_image > a > img').attr('src') ||
|
||||
defaultCover;
|
||||
|
||||
loadedCheerio('.post-content_item, .post-content').each(function () {
|
||||
const detailName = loadedCheerio(this).find('h5').text().trim();
|
||||
const detail = loadedCheerio(this).find('.summary-content').text().trim();
|
||||
|
||||
switch (detailName) {
|
||||
case 'Genre(s)':
|
||||
case 'التصنيفات':
|
||||
novel.genres = detail.replace(/[\\t\\n]/g, ',');
|
||||
break;
|
||||
case 'Author(s)':
|
||||
case 'المؤلف':
|
||||
case 'المؤلف (ين)':
|
||||
novel.author = detail;
|
||||
break;
|
||||
case 'Status':
|
||||
case 'الحالة':
|
||||
novel.status =
|
||||
detail.includes('OnGoing') || detail.includes('مستمرة')
|
||||
? NovelStatus.Ongoing
|
||||
: NovelStatus.Completed;
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
loadedCheerio('div.summary__content .code-block,script').remove();
|
||||
novel.summary =
|
||||
loadedCheerio('div.summary__content').text().trim() ||
|
||||
loadedCheerio('#tab-manga-about').text().trim() ||
|
||||
loadedCheerio('.post-content_item h5:contains("Summary")').next().text().trim();
|
||||
|
||||
let html;
|
||||
|
||||
if (this.options?.useNewChapterEndpoint !== true) {
|
||||
const novelId =
|
||||
loadedCheerio('.rating-post-id').attr('value') ||
|
||||
loadedCheerio('#manga-chapters-holder').attr('data-id') || '';
|
||||
|
||||
const formData = new FormData()
|
||||
formData.append("action", "manga_get_chapters");
|
||||
formData.append("manga", novelId);
|
||||
|
||||
html = await fetchApi(
|
||||
this.site + 'wp-admin/admin-ajax.php',
|
||||
{
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
})
|
||||
.then(res => res.text());
|
||||
} else {
|
||||
html = await fetchApi(
|
||||
novelUrl + 'ajax/chapters/',
|
||||
{ method: 'POST' })
|
||||
.then(res => res.text());
|
||||
}
|
||||
|
||||
if (html !== '0') {
|
||||
loadedCheerio = parseHTML(html);
|
||||
}
|
||||
|
||||
const chapters: Plugin.ChapterItem[] = [];
|
||||
loadedCheerio('.wp-manga-chapter').each(function () {
|
||||
const chapterName = loadedCheerio(this).find('a').text().trim();
|
||||
|
||||
let releaseDate = null;
|
||||
releaseDate = loadedCheerio(this)
|
||||
.find('span.chapter-release-date')
|
||||
.text()
|
||||
.trim();
|
||||
|
||||
if (releaseDate) {
|
||||
releaseDate = parseMadaraDate(releaseDate);
|
||||
} else {
|
||||
/**
|
||||
* Insert current date
|
||||
*/
|
||||
|
||||
releaseDate = dayjs().format('LL');
|
||||
}
|
||||
|
||||
let chapterUrl = loadedCheerio(this).find('a').attr('href') || '';
|
||||
|
||||
chapters.push({ name: chapterName, releaseTime: releaseDate, url: chapterUrl });
|
||||
});
|
||||
|
||||
novel.chapters = chapters.reverse();
|
||||
return novel;
|
||||
}
|
||||
async parseChapter(chapterUrl: string): Promise<string> {
|
||||
const body = await fetchApi(chapterUrl).then(res => res.text());
|
||||
|
||||
const loadedCheerio = parseHTML(body);
|
||||
const chapterText =
|
||||
loadedCheerio('.text-left').html() ||
|
||||
loadedCheerio('.text-right').html() ||
|
||||
loadedCheerio('.entry-content').html() || "";
|
||||
|
||||
return chapterText;
|
||||
}
|
||||
async searchNovels(searchTerm: string, pageNo?: number | undefined): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
const url = this.site + "?s=" + searchTerm + "&post_type=wp-manga";
|
||||
|
||||
const body = await fetchApi(url).then(res => res.text());
|
||||
|
||||
const loadedCheerio = parseHTML(body);
|
||||
|
||||
|
||||
loadedCheerio('.c-tabs-item__content').each(function () {
|
||||
const novelName = loadedCheerio(this).find('.post-title').text().trim();
|
||||
|
||||
let image = loadedCheerio(this).find('img');
|
||||
const novelCover = image.attr('data-src') || image.attr('src');
|
||||
|
||||
let novelUrl = loadedCheerio(this)
|
||||
.find('.post-title')
|
||||
.find('a')
|
||||
.attr('href') || '';
|
||||
const novel = {
|
||||
name: novelName,
|
||||
cover: novelCover,
|
||||
url: novelUrl,
|
||||
};
|
||||
|
||||
novels.push(novel);
|
||||
});
|
||||
return novels;
|
||||
}
|
||||
async fetchImage(url: string): Promise<string | undefined> {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"noobchanTL","sourceSite":"https://noobchan.xyz/","sourceName":"Noobchan Translation","filters":[],"options":{"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
@@ -247,6 +247,6 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"novelmultiverse","sourceSite":"https://www.novelmultiverse.com/","sourceName":"NovelMultiverse","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":"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":"Picker"}],"options":{"lang":"English"}});
|
||||
const plugin = new MadaraPlugin({"id":"novelmultiverse","sourceSite":"https://www.novelmultiverse.com/","sourceName":"NovelMultiverse","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":1},{"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":1}],"options":{"lang":"English"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
@@ -247,6 +247,6 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"novelr18","sourceSite":"https://novelr18.com/","sourceName":"NovelR18","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":"Picker"}],"options":{"path":{"novels":"novel","novel":"manga","chapter":"manga"},"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
const plugin = new MadaraPlugin({"id":"novelr18","sourceSite":"https://novelr18.com/","sourceName":"NovelR18","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":1}],"options":{"path":{"novel":"manga","chapter":"manga"},"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
@@ -247,6 +247,6 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"novelTL","sourceSite":"https://noveltranslate.com/","sourceName":"NovelTranslate","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":"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":"Picker"}],"options":{"path":{"novels":"all-novels","novel":"manga","chapter":"manga","genres":"manga-genre"},"lang":"English"}});
|
||||
const plugin = new MadaraPlugin({"id":"novelTL","sourceSite":"https://noveltranslate.com/","sourceName":"NovelTranslate","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":1},{"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":1}],"options":{"path":{"novels":"all-novels","novel":"manga","chapter":"manga","genres":"manga-genre"},"lang":"English"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
@@ -247,6 +247,6 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"novelstic","sourceSite":"https://novelstic.com/","sourceName":"Novelstic","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":"Picker"}],"options":{"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
const plugin = new MadaraPlugin({"id":"novelstic","sourceSite":"https://novelstic.com/","sourceName":"Novelstic","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":1}],"options":{"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -1,252 +0,0 @@
|
||||
|
||||
import { fetchApi, fetchFile } from "@libs/fetch";
|
||||
import { Filter } from "@libs/filterInputs";
|
||||
import { Plugin } from '@typings/plugin'
|
||||
import { load as parseHTML } from "cheerio";
|
||||
import { defaultCover } from "@libs/defaultCover";
|
||||
import { NovelStatus } from "@libs/novelStatus";
|
||||
import { parseMadaraDate } from "@libs/parseMadaraDate";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
interface MadaraOptionPath{
|
||||
genres?: string,
|
||||
novels?: string,
|
||||
novel?: string,
|
||||
chapter?: string,
|
||||
}
|
||||
|
||||
const MadaraDefaultPath: MadaraOptionPath = {
|
||||
novels: 'novel',
|
||||
novel: 'novel',
|
||||
chapter: 'novel'
|
||||
}
|
||||
|
||||
interface MadaraOptions {
|
||||
useNewChapterEndpoint?: boolean,
|
||||
path?: MadaraOptionPath,
|
||||
lang?: string,
|
||||
orderBy?: string
|
||||
}
|
||||
|
||||
export interface MadaraMetadata {
|
||||
id: string,
|
||||
sourceSite: string,
|
||||
sourceName: string,
|
||||
options?: MadaraOptions,
|
||||
filters?: Filter[],
|
||||
}
|
||||
class MadaraPlugin implements Plugin.PluginBase {
|
||||
id: string;
|
||||
name: string;
|
||||
icon: string;
|
||||
site: string;
|
||||
version: string;
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
this.name = metadata.sourceName + "[madara]";
|
||||
const iconFileName = metadata.sourceName.replace(/\s+/g, "").toLowerCase();
|
||||
this.icon = `multisrc/madara/icons/${iconFileName}.png`;
|
||||
this.site = metadata.sourceSite;
|
||||
this.version = "1.0.0";
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.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 () {
|
||||
const novelName = loadedCheerio(this).find('.post-title').text().trim();
|
||||
let image = loadedCheerio(this).find('img');
|
||||
const novelCover = image.attr('data-src') || image.attr('src');
|
||||
|
||||
let novelUrl = loadedCheerio(this).find('.post-title')
|
||||
.find('a')
|
||||
.attr('href') || '';
|
||||
const novel: Plugin.NovelItem = {
|
||||
name: novelName,
|
||||
cover: novelCover,
|
||||
url: novelUrl,
|
||||
};
|
||||
|
||||
novels.push(novel);
|
||||
});
|
||||
|
||||
return novels;
|
||||
}
|
||||
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> {
|
||||
const novel: Plugin.SourceNovel = {
|
||||
url: novelUrl,
|
||||
};
|
||||
|
||||
const body = await fetchApi(novelUrl).then(res => res.text());
|
||||
|
||||
let loadedCheerio = parseHTML(body);
|
||||
|
||||
loadedCheerio('.manga-title-badges, #manga-title span').remove();
|
||||
novel.name =
|
||||
loadedCheerio('.post-title h1').text().trim() ||
|
||||
loadedCheerio('#manga-title h1').text();
|
||||
|
||||
novel.cover =
|
||||
loadedCheerio('.summary_image > a > img').attr('data-lazy-src') ||
|
||||
loadedCheerio('.summary_image > a > img').attr('data-src') ||
|
||||
loadedCheerio('.summary_image > a > img').attr('src') ||
|
||||
defaultCover;
|
||||
|
||||
loadedCheerio('.post-content_item, .post-content').each(function () {
|
||||
const detailName = loadedCheerio(this).find('h5').text().trim();
|
||||
const detail = loadedCheerio(this).find('.summary-content').text().trim();
|
||||
|
||||
switch (detailName) {
|
||||
case 'Genre(s)':
|
||||
case 'التصنيفات':
|
||||
novel.genres = detail.replace(/[\\t\\n]/g, ',');
|
||||
break;
|
||||
case 'Author(s)':
|
||||
case 'المؤلف':
|
||||
case 'المؤلف (ين)':
|
||||
novel.author = detail;
|
||||
break;
|
||||
case 'Status':
|
||||
case 'الحالة':
|
||||
novel.status =
|
||||
detail.includes('OnGoing') || detail.includes('مستمرة')
|
||||
? NovelStatus.Ongoing
|
||||
: NovelStatus.Completed;
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
loadedCheerio('div.summary__content .code-block,script').remove();
|
||||
novel.summary =
|
||||
loadedCheerio('div.summary__content').text().trim() ||
|
||||
loadedCheerio('#tab-manga-about').text().trim() ||
|
||||
loadedCheerio('.post-content_item h5:contains("Summary")').next().text().trim();
|
||||
|
||||
let html;
|
||||
|
||||
if (this.options?.useNewChapterEndpoint !== true) {
|
||||
const novelId =
|
||||
loadedCheerio('.rating-post-id').attr('value') ||
|
||||
loadedCheerio('#manga-chapters-holder').attr('data-id') || '';
|
||||
|
||||
const formData = new FormData()
|
||||
formData.append("action", "manga_get_chapters");
|
||||
formData.append("manga", novelId);
|
||||
|
||||
html = await fetchApi(
|
||||
this.site + 'wp-admin/admin-ajax.php',
|
||||
{
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
})
|
||||
.then(res => res.text());
|
||||
} else {
|
||||
html = await fetchApi(
|
||||
novelUrl + 'ajax/chapters/',
|
||||
{ method: 'POST' })
|
||||
.then(res => res.text());
|
||||
}
|
||||
|
||||
if (html !== '0') {
|
||||
loadedCheerio = parseHTML(html);
|
||||
}
|
||||
|
||||
const chapters: Plugin.ChapterItem[] = [];
|
||||
loadedCheerio('.wp-manga-chapter').each(function () {
|
||||
const chapterName = loadedCheerio(this).find('a').text().trim();
|
||||
|
||||
let releaseDate = null;
|
||||
releaseDate = loadedCheerio(this)
|
||||
.find('span.chapter-release-date')
|
||||
.text()
|
||||
.trim();
|
||||
|
||||
if (releaseDate) {
|
||||
releaseDate = parseMadaraDate(releaseDate);
|
||||
} else {
|
||||
/**
|
||||
* Insert current date
|
||||
*/
|
||||
|
||||
releaseDate = dayjs().format('LL');
|
||||
}
|
||||
|
||||
let chapterUrl = loadedCheerio(this).find('a').attr('href') || '';
|
||||
|
||||
chapters.push({ name: chapterName, releaseTime: releaseDate, url: chapterUrl });
|
||||
});
|
||||
|
||||
novel.chapters = chapters.reverse();
|
||||
return novel;
|
||||
}
|
||||
async parseChapter(chapterUrl: string): Promise<string> {
|
||||
const body = await fetchApi(chapterUrl).then(res => res.text());
|
||||
|
||||
const loadedCheerio = parseHTML(body);
|
||||
const chapterText =
|
||||
loadedCheerio('.text-left').html() ||
|
||||
loadedCheerio('.text-right').html() ||
|
||||
loadedCheerio('.entry-content').html() || "";
|
||||
|
||||
return chapterText;
|
||||
}
|
||||
async searchNovels(searchTerm: string, pageNo?: number | undefined): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
const url = this.site + "?s=" + searchTerm + "&post_type=wp-manga";
|
||||
|
||||
const body = await fetchApi(url).then(res => res.text());
|
||||
|
||||
const loadedCheerio = parseHTML(body);
|
||||
|
||||
|
||||
loadedCheerio('.c-tabs-item__content').each(function () {
|
||||
const novelName = loadedCheerio(this).find('.post-title').text().trim();
|
||||
|
||||
let image = loadedCheerio(this).find('img');
|
||||
const novelCover = image.attr('data-src') || image.attr('src');
|
||||
|
||||
let novelUrl = loadedCheerio(this)
|
||||
.find('.post-title')
|
||||
.find('a')
|
||||
.attr('href') || '';
|
||||
const novel = {
|
||||
name: novelName,
|
||||
cover: novelCover,
|
||||
url: novelUrl,
|
||||
};
|
||||
|
||||
novels.push(novel);
|
||||
});
|
||||
return novels;
|
||||
}
|
||||
async fetchImage(url: string): Promise<string | undefined> {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"onlymtl","sourceSite":"https://www.onlymtl.com/","sourceName":"OnlyMTL","filters":[],"options":{"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
@@ -247,6 +247,6 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"readwebnovels","sourceSite":"https://readwebnovels.net/","sourceName":"ReadWebNovels","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":"Picker"}],"options":{"lang":"English"}});
|
||||
const plugin = new MadaraPlugin({"id":"readwebnovels","sourceSite":"https://readwebnovels.net/","sourceName":"ReadWebNovels","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":1}],"options":{"lang":"English"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
@@ -247,6 +247,6 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"sleeptTLS","sourceSite":"https://sleepytranslations.com/","sourceName":"SleepyTranslations","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":"Picker"}],"options":{"path":{"novels":"series","novel":"series","chapter":"series"},"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
const plugin = new MadaraPlugin({"id":"sleeptTLS","sourceSite":"https://sleepytranslations.com/","sourceName":"SleepyTranslations","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":1}],"options":{"path":{"novels":"series","novel":"series","chapter":"series"},"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
@@ -247,6 +247,6 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"sonicmtl","sourceSite":"https://www.sonicmtl.com/","sourceName":"SonicMTL","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":"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":"Picker"}],"options":{"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
const plugin = new MadaraPlugin({"id":"sonicmtl","sourceSite":"https://www.sonicmtl.com/","sourceName":"SonicMTL","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":1},{"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":1}],"options":{"useNewChapterEndpoint":true,"lang":"English"}});
|
||||
export default plugin;
|
||||
|
||||
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
userAgent: string;
|
||||
cookieString: string;
|
||||
options?: MadaraOptions;
|
||||
filter?: Filter[] | undefined;
|
||||
filters?: Filter[] | undefined;
|
||||
|
||||
constructor(metadata: MadaraMetadata){
|
||||
this.id = metadata.id;
|
||||
@@ -56,14 +56,14 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
this.userAgent = "";
|
||||
this.cookieString = "";
|
||||
this.options = metadata.options;
|
||||
this.filter = metadata.filters;
|
||||
this.filters = metadata.filters;
|
||||
}
|
||||
async popularNovels(pageNo: number, {filters, showLatestNovels}: Plugin.PopularNovelsOptions): Promise<Plugin.NovelItem[]> {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
let url = this.site;
|
||||
if (filters?.genres && this.options?.path?.genres) {
|
||||
url += this.options?.path?.genres + filters.genres + '/';
|
||||
url += this.options?.path?.genres + filters.genres;
|
||||
} else {
|
||||
url += this.options?.path?.novels ? this.options.path.novels : MadaraDefaultPath.novels;
|
||||
}
|
||||
@@ -247,6 +247,6 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
return await fetchFile(url, {});
|
||||
}
|
||||
}
|
||||
const plugin = new MadaraPlugin({"id":"sweetEscapeTL","sourceSite":"https://sweetescapetranslations.com/","sourceName":"Sweet Escape Translations","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":"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":"Picker"}],"options":{"path":{"novels":"manga","novel":"manga","chapter":"manga","genres":"manga-genre"},"useNewChapterEndpoint":false,"lang":"English"}});
|
||||
const plugin = new MadaraPlugin({"id":"sweetEscapeTL","sourceSite":"https://sweetescapetranslations.com/","sourceName":"Sweet Escape Translations","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":1},{"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":1}],"options":{"path":{"novels":"manga","novel":"manga","chapter":"manga","genres":"manga-genre"},"useNewChapterEndpoint":false,"lang":"English"}});
|
||||
export default plugin;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user