fix: Update Plugins (#677)

* typo

* update

* fix

* fix

* update

* ifreedom

* fix

* fix ranobelib

* ...
This commit is contained in:
Rider21
2024-01-07 14:25:02 +03:00
committed by GitHub
parent 8a267561cb
commit f36e93d0a6
154 changed files with 68923 additions and 58660 deletions
+708
View File
@@ -0,0 +1,708 @@
{
"العربية": [
{
"id": "ar-mtl",
"name": "ArMTL[madara]",
"site": "https://ar-mtl.club/",
"lang": "العربية",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/arabic/ArMTL[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/armtl.png"
},
{
"id": "arnovel",
"name": "ArNovel[madara]",
"site": "https://arnovel.me/",
"lang": "العربية",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/arabic/ArNovel[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/arnovel.png"
},
{
"id": "hizomanga",
"name": "HizoManga[madara]",
"site": "https://hizomanga.com/",
"lang": "العربية",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/arabic/HizoManga[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/hizomanga.png"
},
{
"id": "kol-novel",
"name": "Kol Novel[wpmangastream]",
"site": "https://kolnovel.com/",
"lang": "العربية",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/arabic/KolNovel[wpmangastream].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/wpmangastream/icons/kol-novel.png"
},
{
"id": "kolnovel",
"name": "KolNovel",
"site": "https://kolnovel.lol/",
"lang": "العربية",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/arabic/kolnovel.js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/wpmangastream/icons/kolnovel.png"
},
{
"id": "novel4up",
"name": "Novel4Up[madara]",
"site": "https://novel4up.com/",
"lang": "العربية",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/arabic/Novel4Up[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/novel4up.png"
},
{
"id": "riwyat",
"name": "Riwyat[madara]",
"site": "https://riwyat.com/",
"lang": "العربية",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/arabic/Riwyat[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/riwyat.png"
},
{
"id": "teamxnovel",
"name": "TeamXNovel[madara]",
"site": "https://teamxnovel.com/",
"lang": "العربية",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/arabic/TeamXNovel[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/teamxnovel.png"
}
],
"中文, 汉语, 漢語": [
{
"id": "linovelib",
"name": "Linovelib",
"site": "https://w.linovelib.com",
"lang": "中文, 汉语, 漢語",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/chinese/linovelib.js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/src/cn/linovelib/icon.png"
}
],
"English": [
{
"id": "1stkissnovel",
"name": "FirstKissNovel[madara]",
"site": "https://1stkissnovel.org/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/FirstKissNovel[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/firstkissnovel.png"
},
{
"id": "BLN.com",
"name": "BestLightNovel",
"site": "https://bestlightnovel.com/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/bestlightnovel.js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/src/en/bestlightnovel/icon.png"
},
{
"id": "boxnovel",
"name": "BoxNovel[madara]",
"site": "https://boxnovel.com/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/BoxNovel[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/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/Rider21/lnreader-sources/plugins/.js/plugins/english/ClickNovel[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/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/Rider21/lnreader-sources/plugins/.js/plugins/english/CrateNovel[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/cratenovel.png"
},
{
"id": "daonovel",
"name": "DaoNovel[madara]",
"site": "https://daonovel.com/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/DaoNovel[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/daonovel.png"
},
{
"id": "fanTLS",
"name": "Fans Translations[madara]",
"site": "https://fanstranslations.com/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/FansTranslations[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/fanstranslations.png"
},
{
"id": "freenovel.me",
"name": "FreeNovelMe[madara]",
"site": "https://freenovel.me/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/FreeNovelMe[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/freenovelme.png"
},
{
"id": "ftest",
"name": "Filter Test",
"site": "https://noblemtl.com/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/filterTests.js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/src/en/noblemtl/icon.png"
},
{
"id": "FWN.com",
"name": "Web NOVEL",
"site": "https://freewebnovel.com",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/freewebnovel.js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/src/en/freewebnovel/icon.png"
},
{
"id": "guavaread",
"name": "Guavaread[madara]",
"site": "https://guavaread.com/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/Guavaread[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/guavaread.png"
},
{
"id": "lnheaven",
"name": "LightNovelHeaven[madara]",
"site": "https://lightnovelheaven.com/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/LightNovelHeaven[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/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/Rider21/lnreader-sources/plugins/.js/plugins/english/Ltnovel[readwn].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/readwn/icons/ltnovel.png"
},
{
"id": "lunarletters",
"name": "LunarLetters[madara]",
"site": "https://www.lunarletters.com/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/LunarLetters[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/lunarletters.png"
},
{
"id": "mostnovel",
"name": "MostNovel[madara]",
"site": "https://mostnovel.com/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/MostNovel[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/mostnovel.png"
},
{
"id": "mtl-novel",
"name": "MTL-Novel[madara]",
"site": "https://mtl-novel.com/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/MTLNovel[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/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/Rider21/lnreader-sources/plugins/.js/plugins/english/MTLNovelClub[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/mtlnovel.club.png"
},
{
"id": "mysticalmerries",
"name": "MysticalSeries[madara]",
"site": "https://mysticalmerries.com/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/MysticalSeries[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/mysticalseries.png"
},
{
"id": "neosekaiTLS",
"name": "NeoSekai Translations[madara]",
"site": "https://www.neosekaitranslations.com/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/NeoSekaiTranslations[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/neosekaitranslations.png"
},
{
"id": "noblemtl",
"name": "NobleMTL",
"site": "https://noblemtl.com/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/nobleMTL.js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/src/en/noblemtl/icon.png"
},
{
"id": "nocturneTLS",
"name": "Nocturne Translations[madara]",
"site": "https://nocturnetls.net/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/NocturneTranslations[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/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/Rider21/lnreader-sources/plugins/.js/plugins/english/NoobchanTranslation[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/noobchantranslation.png"
},
{
"id": "novelmultiverse",
"name": "NovelMultiverse[madara]",
"site": "https://www.novelmultiverse.com/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/NovelMultiverse[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/novelmultiverse.png"
},
{
"id": "novelr18",
"name": "NovelR18[madara]",
"site": "https://novelr18.com/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/NovelR18[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/novelr18.png"
},
{
"id": "novelroom",
"name": "Novelroom.net[madara]",
"site": "https://novelroom.net/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/Novelroomnet[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/novelroom.net.png"
},
{
"id": "novelstic",
"name": "Novelstic[madara]",
"site": "https://novelstic.com/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/Novelstic[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/novelstic.png"
},
{
"id": "novelTL",
"name": "NovelTranslate[madara]",
"site": "https://noveltranslate.com/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/NovelTranslate[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/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/Rider21/lnreader-sources/plugins/.js/plugins/english/OnlyMTL[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/onlymtl.png"
},
{
"id": "pandamtl",
"name": "PandaMTL",
"site": "https://pandamtl.com/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/pandaMTL.js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/src/en/wordpress/icon.png"
},
{
"id": "readwebnovels",
"name": "ReadWebNovels[madara]",
"site": "https://readwebnovels.net/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/ReadWebNovels[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/readwebnovels.png"
},
{
"id": "sleeptTLS",
"name": "SleepyTranslations[madara]",
"site": "https://sleepytranslations.com/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/SleepyTranslations[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/sleepytranslations.png"
},
{
"id": "sonicmtl",
"name": "SonicMTL[madara]",
"site": "https://www.sonicmtl.com/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/SonicMTL[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/sonicmtl.png"
},
{
"id": "sugarbbscan",
"name": "Sugar Babies[madara]",
"site": "https://sugarbbscan.com/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/SugarBabies[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/sugarbabies.png"
},
{
"id": "sweetEscapeTL",
"name": "Sweet Escape Translations[madara]",
"site": "https://sweetescapetranslations.com/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/SweetEscapeTranslations[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/sweetescapetranslations.png"
},
{
"id": "webnovelover",
"name": "WebNovelLover[madara]",
"site": "https://www.webnovelover.com/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/WebNovelLover[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/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/Rider21/lnreader-sources/plugins/.js/plugins/english/Wuxiacity[readwn].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/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/Rider21/lnreader-sources/plugins/.js/plugins/english/Wuxiap[readwn].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/readwn/icons/wuxiap.png"
},
{
"id": "wuxiaworld.site",
"name": "WuxiaWorld.Site[madara]",
"site": "https://wuxiaworld.site/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/WuxiaWorldSite[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/wuxiaworld.site.png"
},
{
"id": "zetroTL",
"name": "Zetro Translation[madara]",
"site": "https://zetrotranslation.com/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/ZetroTranslation[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/zetrotranslation.png"
},
{
"id": "zinnovel",
"name": "ZinnNovel[madara]",
"site": "https://zinnovel.com/",
"lang": "English",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/english/ZinnNovel[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/zinnnovel.png"
}
],
"français, française": [
{
"id": "chireads.com",
"name": "Chireads",
"site": "https://chireads.com",
"lang": "français, française",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/french/chireads.js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/src/fr/chireads/icon.png"
},
{
"id": "lightnovelfr",
"name": "Ligh Novel FR[wpmangastream]",
"site": "https://lightnovelfr.com/",
"lang": "français, française",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/french/LighNovelFR[wpmangastream].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/wpmangastream/icons/lightnovelfr.png"
},
{
"id": "NDG.com",
"name": "NovelDeGlace",
"site": "https://noveldeglace.com/",
"lang": "français, française",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/french/noveldeglace.js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/src/fr/noveldeglace/icon.png"
}
],
"Bahasa Indonesia": [
{
"id": "meionovel",
"name": "MeioNovel[madara]",
"site": "https://meionovel.id/",
"lang": "Bahasa Indonesia",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/indonesian/MeioNovel[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/meionovel.png"
},
{
"id": "morenovel",
"name": "MoreNovel[madara]",
"site": "https://morenovel.net/",
"lang": "Bahasa Indonesia",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/indonesian/MoreNovel[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/morenovel.png"
},
{
"id": "wbnovel",
"name": "WBNovel[madara]",
"site": "https://wbnovel.com/",
"lang": "Bahasa Indonesia",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/indonesian/WBNovel[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/wbnovel.png"
}
],
"Português": [
{
"id": "lightnovelbrasil",
"name": "Light Novel Brasil",
"site": "https://lightnovelbrasil.com/",
"lang": "Português",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/portuguese/lightnovelbrasil.js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/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/Rider21/lnreader-sources/plugins/.js/plugins/russian/authortoday.js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/src/ru/authortoday/icon.png"
},
{
"id": "bookhamster",
"name": "Bookhamster[ifreedom]",
"site": "https://bookhamster.ru",
"lang": "русский язык",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/russian/Bookhamster[ifreedom].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/ifreedom/icons/bookhamster.png"
},
{
"id": "bookriver",
"name": "Bookriver",
"site": "https://bookriver.ru",
"lang": "русский язык",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/russian/bookriver.js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/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/Rider21/lnreader-sources/plugins/.js/plugins/russian/Erolate[rulate].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/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/Rider21/lnreader-sources/plugins/.js/plugins/russian/ficbook.js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/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/Rider21/lnreader-sources/plugins/.js/plugins/russian/LitSpace.js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/src/ru/freedlit/icon.png"
},
{
"id": "ifreedom",
"name": "Свободный Мир Ранобэ[ifreedom]",
"site": "https://ifreedom.su",
"lang": "русский язык",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/russian/СвободныйМирРанобэ[ifreedom].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/ifreedom/icons/ifreedom.png"
},
{
"id": "jaomix.ru",
"name": "Jaomix",
"site": "https://jaomix.ru",
"lang": "русский язык",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/russian/jaomix.js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/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/Rider21/lnreader-sources/plugins/.js/plugins/russian/renovels.js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/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/Rider21/lnreader-sources/plugins/.js/plugins/russian/ranobelib.js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/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/Rider21/lnreader-sources/plugins/.js/plugins/russian/ranobehub.js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/src/ru/ranobehub/icon.png"
},
{
"id": "RNRF",
"name": "РанобэРФ",
"site": "https://ранобэ.рф",
"lang": "русский язык",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/russian/ranoberf.js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/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/Rider21/lnreader-sources/plugins/.js/plugins/russian/novelTL.js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/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/Rider21/lnreader-sources/plugins/.js/plugins/russian/Rulate[rulate].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/rulate/icons/rulate.png"
}
],
"español, castellano": [
{
"id": "tunovelaligera",
"name": "TuNovelaLigera",
"site": "https://tunovelaligera.com/",
"lang": "español, castellano",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/spanish/tunovelaligera.js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/src/es/tunovelaligera/icon.png"
}
],
"Türkçe": [
{
"id": "lshnovel",
"name": "Liebe Schnee Hiver Novel",
"site": "https://lshnovel.com/",
"lang": "Türkçe",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/turkish/lshnovel.js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/wpmangastream/icons/lshnovel.png"
},
{
"id": "turkcelightnovels",
"name": "TurkceLightNovels[madara]",
"site": "https://turkcelightnovels.com/",
"lang": "Türkçe",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/turkish/TurkceLightNovels[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/multisrc/madara/icons/turkcelightnovels.png"
},
{
"id": "webnoveloku",
"name": "WebNovelOku [madara]",
"site": "https://www.webnoveloku.com/",
"lang": "Türkçe",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/turkish/WebNovelOku[madara].js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/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/Rider21/lnreader-sources/plugins/.js/plugins/ukraine/smakolykytl.js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/src/ua/smakolykytl/icon.png"
}
],
"Tiếng Việt": [
{
"id": "ln.hako",
"name": "Hako",
"site": "https://ln.hako.vn",
"lang": "Tiếng Việt",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/.js/plugins/vietnamese/LNHako.js",
"iconUrl": "https://raw.githubusercontent.com/Rider21/lnreader-sources/plugins/icons/src/vi/hakolightnovel/icon.png"
}
]
}
File diff suppressed because one or more lines are too long
+7 -6
View File
@@ -46,6 +46,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -75,20 +76,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+7 -6
View File
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+7 -6
View File
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+78 -107
View File
@@ -38,177 +38,148 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
Object.defineProperty(exports, "__esModule", { value: true });
var cheerio_1 = require("cheerio");
var fetch_1 = require("@libs/fetch");
var LightNovelFRPlugin = /** @class */ (function () {
function LightNovelFRPlugin() {
this.id = "kol-novel";
this.name = "Kol Novel[wpmangastream]";
this.icon = "multisrc/wpmangastream/icons/kol-novel.png";
this.site = "https://kolnovel.com/";
var WPmangaStreamPlugin = /** @class */ (function () {
function WPmangaStreamPlugin(metadata) {
this.fetchImage = fetch_1.fetchFile;
this.id = metadata.id;
this.name = metadata.sourceName + "[wpmangastream]";
this.icon = "multisrc/wpmangastream/icons/".concat(metadata.id, ".png");
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "''";
this.cookieString = "''";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
}
LightNovelFRPlugin.prototype.popularNovels = function (page) {
WPmangaStreamPlugin.prototype.popularNovels = function (page) {
return __awaiter(this, void 0, void 0, function () {
var url, body, loadedCheerio, novels;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
url = this.site + 'series/?page=' + page + '&status=&order=popular';
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, {})];
case 1: return [4 /*yield*/, (_a.sent()).text()];
case 2:
url = this.site + "series/?page=" + page + "&status=&order=popular";
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);
novels = [];
loadedCheerio('article.maindet').each(function () {
var novelName = loadedCheerio(this).find('h2').text();
var image = loadedCheerio(this).find('img');
var novelCover = image.attr('data-src') || image.attr('src');
var novelUrl = loadedCheerio(this).find('h2 a').attr('href');
if (!novelUrl)
loadedCheerio("article.maindet").each(function () {
var name = loadedCheerio(this).find("h2").text();
var image = loadedCheerio(this).find("img");
var url = loadedCheerio(this).find("h2 a").attr("href");
if (!url)
return;
var novel = {
name: novelName,
cover: novelCover,
url: novelUrl,
};
novels.push(novel);
novels.push({
name: name,
cover: image.attr("data-src") || image.attr("src"),
url: url,
});
});
return [2 /*return*/, novels];
}
});
});
};
LightNovelFRPlugin.prototype.parseNovelAndChapters = function (novelUrl) {
WPmangaStreamPlugin.prototype.parseNovelAndChapters = function (url) {
var _a;
return __awaiter(this, void 0, void 0, function () {
var url, body, loadedCheerio, novel, summary, i, p, novelChapters;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
url = novelUrl;
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, {})];
case 1: return [4 /*yield*/, (_a.sent()).text()];
case 2:
body = _a.sent();
var body, loadedCheerio, novel, summary, i, p, chapters;
return __generator(this, function (_b) {
switch (_b.label) {
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _b.sent();
loadedCheerio = (0, cheerio_1.load)(body);
novel = { url: url };
// novel.url = url;
novel.name = loadedCheerio('h1.entry-title').text();
novel.name = loadedCheerio("h1.entry-title").text();
novel.cover =
loadedCheerio('img.wp-post-image').attr('data-src') ||
loadedCheerio('img.wp-post-image').attr('src');
novel.status = loadedCheerio('div.sertostat > span').attr('class');
loadedCheerio('div.serl > span').each(function () {
loadedCheerio("img.wp-post-image").attr("data-src") ||
loadedCheerio("img.wp-post-image").attr("src");
novel.status = loadedCheerio("div.sertostat > span").attr("class");
loadedCheerio("div.serl > span").each(function () {
var detailName = loadedCheerio(this).text().trim();
var detail = loadedCheerio(this).next().text().trim();
switch (detailName) {
case 'الكاتب':
case 'Author':
case 'Auteur':
case "الكاتب":
case "Author":
case "Auteur":
novel.author = detail;
break;
}
});
novel.genres = loadedCheerio('.sertogenre')
.children('a')
novel.genres = loadedCheerio(".sertogenre")
.children("a")
.map(function (i, el) { return loadedCheerio(el).text(); })
.toArray()
.join(',');
summary = loadedCheerio('.sersys > p').siblings().remove("div").end();
.join(",");
summary = loadedCheerio(".sersys > p").siblings().remove("div").end();
novel.summary = "";
for (i = 0; i < summary.length; i++) {
p = summary[i];
novel.summary += loadedCheerio(p).text().trim() + "\n\n";
novel.summary += loadedCheerio(p).text().trim() + "\\n\\n";
}
novelChapters = [];
loadedCheerio('.eplister')
.find('li')
.each(function () {
var chapterName = loadedCheerio(this).find('.epl-num').text() +
' - ' +
loadedCheerio(this).find('.epl-title').text();
var releaseDate = loadedCheerio(this).find('.epl-date').text().trim();
var chapterUrl = loadedCheerio(this).find('a').attr('href');
if (!chapterUrl)
return;
var chapter = {
name: chapterName,
url: chapterUrl,
releaseDate: releaseDate,
};
novelChapters.push(chapter);
});
novel.chapters = novelChapters;
if (novel.chapters)
novel.chapters.reverse();
chapters = loadedCheerio(".eplister li")
.map(function (index, element) { return ({
name: loadedCheerio(element).find(".epl-num").text() +
loadedCheerio(element).find(".epl-title").text(),
releaseTime: loadedCheerio(element).find(".epl-date").text().trim(),
url: loadedCheerio(element).find("a").attr("href") || "",
}); })
.get()
.filter(function (chapter) { return chapter.name && chapter.url; });
if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.reverseChapters) && chapters.length)
chapters.reverse();
novel.chapters = chapters;
return [2 /*return*/, novel];
}
});
});
};
LightNovelFRPlugin.prototype.parseChapter = function (chapterUrl) {
WPmangaStreamPlugin.prototype.parseChapter = function (chapterUrl) {
return __awaiter(this, void 0, void 0, function () {
var url, body, loadedCheerio, chapterText;
var body, loadedCheerio, chapterText;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
url = chapterUrl;
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, {})];
case 1: return [4 /*yield*/, (_a.sent()).text()];
case 2:
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('.epcontent').html() || '';
chapterText = loadedCheerio(".epcontent").html() || "";
return [2 /*return*/, chapterText];
}
});
});
};
;
LightNovelFRPlugin.prototype.searchNovels = function (searchTerm) {
WPmangaStreamPlugin.prototype.searchNovels = function (searchTerm) {
return __awaiter(this, void 0, void 0, function () {
var url, body, loadedCheerio, novels;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
url = this.site + "?s=" + searchTerm;
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, {})];
case 1: return [4 /*yield*/, (_a.sent()).text()];
case 2:
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);
novels = [];
loadedCheerio('article.maindet').each(function () {
var novelName = loadedCheerio(this).find('h2').text();
var image = loadedCheerio(this).find('img');
var novelCover = image.attr('data-src') || image.attr('src');
var novelUrl = loadedCheerio(this).find('h2 a').attr('href');
if (!novelUrl)
loadedCheerio("article.maindet").each(function () {
var name = loadedCheerio(this).find("h2").text();
var image = loadedCheerio(this).find("img");
var url = loadedCheerio(this).find("h2 a").attr("href");
if (!url)
return;
var novel = {
name: novelName,
cover: novelCover,
url: novelUrl,
};
novels.push(novel);
novels.push({
name: name,
cover: image.attr("data-src") || image.attr("src"),
url: url,
});
});
return [2 /*return*/, novels];
}
});
});
};
;
LightNovelFRPlugin.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 LightNovelFRPlugin;
return WPmangaStreamPlugin;
}());
exports.default = new LightNovelFRPlugin();
var plugin = new WPmangaStreamPlugin({ "id": "kol-novel", "sourceSite": "https://kolnovel.com/", "sourceName": "Kol Novel", "options": { "lang": "arabic", "reverseChapters": true } });
exports.default = plugin;
+7 -6
View File
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+7 -6
View File
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+7 -6
View File
@@ -46,6 +46,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -75,20 +76,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+7 -6
View File
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+7 -6
View File
@@ -46,6 +46,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -75,20 +76,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+7 -6
View File
@@ -46,6 +46,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -75,20 +76,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+7 -6
View File
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+7 -6
View File
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+7 -6
View File
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
File diff suppressed because one or more lines are too long
+7 -6
View File
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+7 -6
View File
@@ -46,6 +46,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -75,20 +76,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+7 -6
View File
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+7 -6
View File
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
@@ -46,6 +46,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -75,20 +76,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+7 -6
View File
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+7 -6
View File
@@ -46,6 +46,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -75,20 +76,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+7 -6
View File
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+7 -6
View File
@@ -46,6 +46,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -75,20 +76,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+7 -6
View File
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+7 -6
View File
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+7 -6
View File
@@ -46,6 +46,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -75,20 +76,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+7 -6
View File
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+7 -6
View File
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+160
View File
@@ -0,0 +1,160 @@
"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 fetch_1 = require("@libs/fetch");
var cheerio_1 = require("cheerio");
var FreeWebNovel = /** @class */ (function () {
function FreeWebNovel() {
this.id = "FWN.com";
this.name = "Web NOVEL";
this.site = "https://freewebnovel.com";
this.version = "1.0.0";
this.icon = "src/en/freewebnovel/icon.png";
this.userAgent = "";
this.cookieString = "";
this.fetchImage = fetch_1.fetchFile;
}
FreeWebNovel.prototype.popularNovels = function (page, _a) {
var showLatestNovels = _a.showLatestNovels;
return __awaiter(this, void 0, void 0, function () {
var sort, body, loadedCheerio, novels;
var _this = this;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
sort = showLatestNovels
? "/latest-release-novels/"
: "/completed-novels/";
return [4 /*yield*/, (0, fetch_1.fetchApi)(this.site + sort + page).then(function (res) { return res.text(); })];
case 1:
body = _b.sent();
loadedCheerio = (0, cheerio_1.load)(body);
novels = loadedCheerio(".li-row")
.map(function (index, element) { return ({
name: loadedCheerio(element).find(".tit").text(),
cover: loadedCheerio(element).find("img").attr("src"),
url: _this.site + loadedCheerio(element).find("h3 > a").attr("href"),
}); })
.get();
return [2 /*return*/, novels];
}
});
});
};
FreeWebNovel.prototype.parseNovelAndChapters = function (url) {
return __awaiter(this, void 0, void 0, function () {
var body, loadedCheerio, novel, chapters;
var _this = this;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: 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);
novel = { url: url };
novel.name = loadedCheerio("h1.tit").text();
novel.cover = loadedCheerio(".pic > img").attr("src");
novel.genres = loadedCheerio("[title=Genre]")
.next()
.text()
.replace(/[\t\n]/g, "");
novel.author = loadedCheerio("[title=Author]")
.next()
.text()
.replace(/[\t\n]/g, "");
novel.status = loadedCheerio("[title=Status]")
.next()
.text()
.replace(/[\t\n]/g, "");
novel.summary = loadedCheerio(".inner").text().trim();
chapters = loadedCheerio("#idData > li > a")
.map(function (index, element) { return ({
name: loadedCheerio(element).attr("title") || "Chapter " + index,
releaseTime: null,
url: _this.site + loadedCheerio(element).attr("href"),
}); })
.get();
novel.chapters = chapters;
return [2 /*return*/, novel];
}
});
});
};
FreeWebNovel.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("div.txt").html() || "";
return [2 /*return*/, chapterText];
}
});
});
};
FreeWebNovel.prototype.searchNovels = function (searchkey) {
return __awaiter(this, void 0, void 0, function () {
var body, loadedCheerio, novels;
var _this = this;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)(this.site + "/search/", {
method: "POST",
body: JSON.stringify({ searchkey: searchkey }),
}).then(function (res) { return res.text(); })];
case 1:
body = _a.sent();
loadedCheerio = (0, cheerio_1.load)(body);
novels = loadedCheerio(".li-row > .li > .con")
.map(function (index, element) { return ({
name: loadedCheerio(element).find(".tit").text(),
cover: loadedCheerio(element).find(".pic > a > img").attr("data-cfsrc"),
url: _this.site + loadedCheerio(element).find("h3 > a").attr("href"),
}); })
.get();
return [2 /*return*/, novels];
}
});
});
};
return FreeWebNovel;
}());
exports.default = new FreeWebNovel();
+78 -107
View File
@@ -38,177 +38,148 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
Object.defineProperty(exports, "__esModule", { value: true });
var cheerio_1 = require("cheerio");
var fetch_1 = require("@libs/fetch");
var LightNovelFRPlugin = /** @class */ (function () {
function LightNovelFRPlugin() {
this.id = "lightnovelfr";
this.name = "Ligh Novel FR[wpmangastream]";
this.icon = "multisrc/wpmangastream/icons/lightnovelfr.png";
this.site = "https://lightnovelfr.com/";
var WPmangaStreamPlugin = /** @class */ (function () {
function WPmangaStreamPlugin(metadata) {
this.fetchImage = fetch_1.fetchFile;
this.id = metadata.id;
this.name = metadata.sourceName + "[wpmangastream]";
this.icon = "multisrc/wpmangastream/icons/".concat(metadata.id, ".png");
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "''";
this.cookieString = "''";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
}
LightNovelFRPlugin.prototype.popularNovels = function (page) {
WPmangaStreamPlugin.prototype.popularNovels = function (page) {
return __awaiter(this, void 0, void 0, function () {
var url, body, loadedCheerio, novels;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
url = this.site + 'series/?page=' + page + '&status=&order=popular';
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, {})];
case 1: return [4 /*yield*/, (_a.sent()).text()];
case 2:
url = this.site + "series/?page=" + page + "&status=&order=popular";
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);
novels = [];
loadedCheerio('article.maindet').each(function () {
var novelName = loadedCheerio(this).find('h2').text();
var image = loadedCheerio(this).find('img');
var novelCover = image.attr('data-src') || image.attr('src');
var novelUrl = loadedCheerio(this).find('h2 a').attr('href');
if (!novelUrl)
loadedCheerio("article.maindet").each(function () {
var name = loadedCheerio(this).find("h2").text();
var image = loadedCheerio(this).find("img");
var url = loadedCheerio(this).find("h2 a").attr("href");
if (!url)
return;
var novel = {
name: novelName,
cover: novelCover,
url: novelUrl,
};
novels.push(novel);
novels.push({
name: name,
cover: image.attr("data-src") || image.attr("src"),
url: url,
});
});
return [2 /*return*/, novels];
}
});
});
};
LightNovelFRPlugin.prototype.parseNovelAndChapters = function (novelUrl) {
WPmangaStreamPlugin.prototype.parseNovelAndChapters = function (url) {
var _a;
return __awaiter(this, void 0, void 0, function () {
var url, body, loadedCheerio, novel, summary, i, p, novelChapters;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
url = novelUrl;
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, {})];
case 1: return [4 /*yield*/, (_a.sent()).text()];
case 2:
body = _a.sent();
var body, loadedCheerio, novel, summary, i, p, chapters;
return __generator(this, function (_b) {
switch (_b.label) {
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _b.sent();
loadedCheerio = (0, cheerio_1.load)(body);
novel = { url: url };
// novel.url = url;
novel.name = loadedCheerio('h1.entry-title').text();
novel.name = loadedCheerio("h1.entry-title").text();
novel.cover =
loadedCheerio('img.wp-post-image').attr('data-src') ||
loadedCheerio('img.wp-post-image').attr('src');
novel.status = loadedCheerio('div.sertostat > span').attr('class');
loadedCheerio('div.serl > span').each(function () {
loadedCheerio("img.wp-post-image").attr("data-src") ||
loadedCheerio("img.wp-post-image").attr("src");
novel.status = loadedCheerio("div.sertostat > span").attr("class");
loadedCheerio("div.serl > span").each(function () {
var detailName = loadedCheerio(this).text().trim();
var detail = loadedCheerio(this).next().text().trim();
switch (detailName) {
case 'الكاتب':
case 'Author':
case 'Auteur':
case "الكاتب":
case "Author":
case "Auteur":
novel.author = detail;
break;
}
});
novel.genres = loadedCheerio('.sertogenre')
.children('a')
novel.genres = loadedCheerio(".sertogenre")
.children("a")
.map(function (i, el) { return loadedCheerio(el).text(); })
.toArray()
.join(',');
summary = loadedCheerio('.sersys > p').siblings().remove("div").end();
.join(",");
summary = loadedCheerio(".sersys > p").siblings().remove("div").end();
novel.summary = "";
for (i = 0; i < summary.length; i++) {
p = summary[i];
novel.summary += loadedCheerio(p).text().trim() + "\n\n";
novel.summary += loadedCheerio(p).text().trim() + "\\n\\n";
}
novelChapters = [];
loadedCheerio('.eplister')
.find('li')
.each(function () {
var chapterName = loadedCheerio(this).find('.epl-num').text() +
' - ' +
loadedCheerio(this).find('.epl-title').text();
var releaseDate = loadedCheerio(this).find('.epl-date').text().trim();
var chapterUrl = loadedCheerio(this).find('a').attr('href');
if (!chapterUrl)
return;
var chapter = {
name: chapterName,
url: chapterUrl,
releaseDate: releaseDate,
};
novelChapters.push(chapter);
});
novel.chapters = novelChapters;
if (novel.chapters)
novel.chapters.reverse();
chapters = loadedCheerio(".eplister li")
.map(function (index, element) { return ({
name: loadedCheerio(element).find(".epl-num").text() +
loadedCheerio(element).find(".epl-title").text(),
releaseTime: loadedCheerio(element).find(".epl-date").text().trim(),
url: loadedCheerio(element).find("a").attr("href") || "",
}); })
.get()
.filter(function (chapter) { return chapter.name && chapter.url; });
if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.reverseChapters) && chapters.length)
chapters.reverse();
novel.chapters = chapters;
return [2 /*return*/, novel];
}
});
});
};
LightNovelFRPlugin.prototype.parseChapter = function (chapterUrl) {
WPmangaStreamPlugin.prototype.parseChapter = function (chapterUrl) {
return __awaiter(this, void 0, void 0, function () {
var url, body, loadedCheerio, chapterText;
var body, loadedCheerio, chapterText;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
url = chapterUrl;
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, {})];
case 1: return [4 /*yield*/, (_a.sent()).text()];
case 2:
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('.epcontent').html() || '';
chapterText = loadedCheerio(".epcontent").html() || "";
return [2 /*return*/, chapterText];
}
});
});
};
;
LightNovelFRPlugin.prototype.searchNovels = function (searchTerm) {
WPmangaStreamPlugin.prototype.searchNovels = function (searchTerm) {
return __awaiter(this, void 0, void 0, function () {
var url, body, loadedCheerio, novels;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
url = this.site + "?s=" + searchTerm;
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, {})];
case 1: return [4 /*yield*/, (_a.sent()).text()];
case 2:
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);
novels = [];
loadedCheerio('article.maindet').each(function () {
var novelName = loadedCheerio(this).find('h2').text();
var image = loadedCheerio(this).find('img');
var novelCover = image.attr('data-src') || image.attr('src');
var novelUrl = loadedCheerio(this).find('h2 a').attr('href');
if (!novelUrl)
loadedCheerio("article.maindet").each(function () {
var name = loadedCheerio(this).find("h2").text();
var image = loadedCheerio(this).find("img");
var url = loadedCheerio(this).find("h2 a").attr("href");
if (!url)
return;
var novel = {
name: novelName,
cover: novelCover,
url: novelUrl,
};
novels.push(novel);
novels.push({
name: name,
cover: image.attr("data-src") || image.attr("src"),
url: url,
});
});
return [2 /*return*/, novels];
}
});
});
};
;
LightNovelFRPlugin.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 LightNovelFRPlugin;
return WPmangaStreamPlugin;
}());
exports.default = new LightNovelFRPlugin();
var plugin = new WPmangaStreamPlugin({ "id": "lightnovelfr", "sourceSite": "https://lightnovelfr.com/", "sourceName": "Ligh Novel FR", "options": { "lang": "French", "reverseChapters": true } });
exports.default = plugin;
+7 -6
View File
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+7 -6
View File
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+7 -6
View File
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
@@ -0,0 +1,200 @@
"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 fetch_1 = require("@libs/fetch");
var filterInputs_1 = require("@libs/filterInputs");
var novelStatus_1 = require("@libs/novelStatus");
var cheerio_1 = require("cheerio");
var IfreedomPlugin = /** @class */ (function () {
function IfreedomPlugin(metadata) {
this.fetchImage = fetch_1.fetchFile;
this.id = metadata.id;
this.name = metadata.sourceName + "[ifreedom]";
this.icon = "multisrc/ifreedom/icons/".concat(metadata.id, ".png");
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.filters = metadata.filters;
}
IfreedomPlugin.prototype.popularNovels = function (page, _a) {
var _b, _c, _d, _e;
var filters = _a.filters, showLatestNovels = _a.showLatestNovels;
return __awaiter(this, void 0, void 0, function () {
var url, body, loadedCheerio, novels;
return __generator(this, function (_f) {
switch (_f.label) {
case 0:
url = this.site + "/vse-knigi/?sort=" +
(showLatestNovels ? "По дате обновления" : ((_b = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _b === void 0 ? void 0 : _b.value) || "По рейтингу");
if (((_c = filters === null || filters === void 0 ? void 0 : filters.status) === null || _c === void 0 ? void 0 : _c.value) instanceof Array) {
url += filters.status.value.map(function (i) { return "&status[]=" + i; }).join("");
}
if (((_d = filters === null || filters === void 0 ? void 0 : filters.lang) === null || _d === void 0 ? void 0 : _d.value) instanceof Array) {
url += filters.lang.value.map(function (i) { return "&lang[]=" + i; }).join("");
}
if (((_e = filters === null || filters === void 0 ? void 0 : filters.genre) === null || _e === void 0 ? void 0 : _e.value) instanceof Array) {
url += filters.genre.value.map(function (i) { return "&genre[]=" + i; }).join("");
}
url += "&bpage=" + page;
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _f.sent();
loadedCheerio = (0, cheerio_1.load)(body);
novels = loadedCheerio("div.one-book-home > div.img-home a")
.map(function (index, element) { return ({
name: loadedCheerio(element).attr("title") || "",
cover: loadedCheerio(element).find("img").attr("src"),
url: loadedCheerio(element).attr("href") || "",
}); })
.get()
.filter(function (novel) { return novel.name && novel.url; });
return [2 /*return*/, novels];
}
});
});
};
IfreedomPlugin.prototype.parseNovelAndChapters = function (novelUrl) {
return __awaiter(this, void 0, void 0, function () {
var body, loadedCheerio, novel, chapters;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)(novelUrl).then(function (res) { return res.text(); })];
case 1:
body = _a.sent();
loadedCheerio = (0, cheerio_1.load)(body);
novel = {
url: novelUrl,
name: loadedCheerio(".entry-title").text(),
cover: loadedCheerio(".img-ranobe > img").attr("src"),
summary: loadedCheerio('meta[name="description"]').attr("content"),
};
loadedCheerio("div.data-ranobe").each(function () {
switch (loadedCheerio(this).find("b").text()) {
case "Автор":
novel.author = loadedCheerio(this)
.find("div.data-value")
.text()
.trim();
break;
case "Жанры":
novel.genres = loadedCheerio("div.data-value > a")
.map(function (index, element) { var _a; return (_a = loadedCheerio(element).text()) === null || _a === void 0 ? void 0 : _a.trim(); })
.get()
.join(",");
break;
case "Статус книги":
novel.status = loadedCheerio("div.data-value")
.text()
.includes("активен")
? novelStatus_1.NovelStatus.Ongoing
: novelStatus_1.NovelStatus.Completed;
break;
}
});
if (novel.author == "Не указан")
delete novel.author;
chapters = [];
loadedCheerio("div.li-ranobe").each(function () {
var name = loadedCheerio(this).find("a").text();
var url = loadedCheerio(this).find("a").attr("href");
if (!loadedCheerio(this).find("label.buy-ranobe").length && name && url) {
var releaseTime = loadedCheerio(this)
.find("div.li-col2-ranobe").text().trim();
chapters.push({ name: name, releaseTime: releaseTime, url: url });
}
});
novel.chapters = chapters.reverse();
return [2 /*return*/, novel];
}
});
});
};
IfreedomPlugin.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);
loadedCheerio(".entry-content img").each(function () {
var _a, _b;
var srcset = (_b = (_a = loadedCheerio(this).attr("srcset")) === null || _a === void 0 ? void 0 : _a.split) === null || _b === void 0 ? void 0 : _b.call(_a, " ");
if (srcset === null || srcset === void 0 ? void 0 : srcset.length) {
var bestlink = srcset.filter(function (url) { return url.startsWith("http"); }).unshift();
if (typeof bestlink == 'string')
loadedCheerio(this).attr("src", bestlink);
}
});
chapterText = loadedCheerio(".entry-content").html() || "";
return [2 /*return*/, chapterText];
}
});
});
};
IfreedomPlugin.prototype.searchNovels = function (searchTerm, page) {
if (page === void 0) { page = 1; }
return __awaiter(this, void 0, void 0, function () {
var url, result, loadedCheerio, novels;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
url = this.site + "/vse-knigi/?searchname=" + searchTerm + "&bpage=" + page;
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
result = _a.sent();
loadedCheerio = (0, cheerio_1.load)(result);
novels = loadedCheerio("div.one-book-home > div.img-home a")
.map(function (index, element) { return ({
name: loadedCheerio(element).attr("title") || "",
cover: loadedCheerio(element).find("img").attr("src"),
url: loadedCheerio(element).attr("href") || "",
}); })
.get()
.filter(function (novel) { return novel.name && novel.url; });
return [2 /*return*/, novels];
}
});
});
};
return IfreedomPlugin;
}());
var plugin = new IfreedomPlugin({ "id": "bookhamster", "sourceSite": "https://bookhamster.ru", "sourceName": "Bookhamster", "filters": { "sort": { "type": filterInputs_1.FilterTypes.Picker, "label": "Сортировка:", "options": [{ "label": "По дате добавления", "value": "По дате добавления" }, { "label": "По дате обновления", "value": "По дате обновления" }, { "label": "По количеству глав", "value": "По количеству глав" }, { "label": "По названию", "value": "По названию" }, { "label": "По просмотрам", "value": "По просмотрам" }, { "label": "По рейтингу", "value": "По рейтингу" }], "value": "По рейтингу" }, "status": { "type": filterInputs_1.FilterTypes.CheckboxGroup, "label": "Статус:", "options": [{ "label": "Перевод активен", "value": "Перевод активен" }, { "label": "Перевод приостановлен", "value": "Перевод приостановлен" }, { "label": "Произведение завершено", "value": "Произведение завершено" }], "value": [] }, "lang": { "type": filterInputs_1.FilterTypes.CheckboxGroup, "label": "Язык:", "options": [{ "label": "Английский", "value": "Английский" }, { "label": "Китайский", "value": "Китайский" }, { "label": "Корейский", "value": "Корейский" }, { "label": "Японский", "value": "Японский" }], "value": [] }, "genre": { "type": filterInputs_1.FilterTypes.CheckboxGroup, "label": "Жанры:", "options": [{ "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": "Школьная жизнь", "value": "Школьная жизнь" }, { "label": "Экшн", "value": "Экшн" }, { "label": "Эротика", "value": "Эротика" }, { "label": "Этти", "value": "Этти" }, { "label": "Яой", "value": "Яой" }, { "label": "Adult", "value": "Adult" }, { "label": "Mature", "value": "Mature" }, { "label": "Xianxia", "value": "Xianxia" }, { "label": "Xuanhuan", "value": "Xuanhuan" }], "value": [] } } });
exports.default = plugin;
File diff suppressed because one or more lines are too long
+300
View File
@@ -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 };
}
};
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 = {
sort: {
label: "Сортировка:",
value: "",
options: [
{ label: "По популярности", value: "popular" },
{ label: "По количеству комментариев", value: "comments" },
{ label: "По количеству лайков", value: "likes" },
{ label: "По новизне", value: "recent" },
{ label: "По просмотрам", value: "views" },
],
type: filterInputs_1.FilterTypes.Picker,
},
genre: {
label: "Жанры:",
value: { include: [], exclude: [] },
options: [
{ 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" },
],
type: filterInputs_1.FilterTypes.ExcludableCheckboxGroup,
},
status: {
label: "Статус:",
value: "",
options: [
{ label: "Любой статус", value: "all" },
{ label: "В процессе", value: "in-process" },
{ label: "Завершено", value: "finished" },
],
type: filterInputs_1.FilterTypes.Picker,
},
access: {
label: "Доступ:",
value: "",
options: [
{ label: "Любой доступ", value: "all" },
{ label: "Бесплатные", value: "free" },
{ label: "Платные", value: "paid" },
],
type: filterInputs_1.FilterTypes.Picker,
},
adult: {
label: "Возрастные ограничения:",
value: "",
options: [
{ label: "Скрыть 18+", value: "hide" },
{ label: "Показать +18", value: "show" },
],
type: filterInputs_1.FilterTypes.Picker,
},
};
}
freedlit.prototype.popularNovels = function (page, _a) {
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
var showLatestNovels = _a.showLatestNovels, filters = _a.filters;
return __awaiter(this, void 0, void 0, function () {
var url, body, loadedCheerio, novels;
return __generator(this, function (_m) {
switch (_m.label) {
case 0:
url = this.site + "/get-books/all/list/" + page + "?sort=";
url += showLatestNovels ? "recent" : ((_b = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _b === void 0 ? void 0 : _b.value) || "popular";
url += "&status=" + (((_c = filters === null || filters === void 0 ? void 0 : filters.status) === null || _c === void 0 ? void 0 : _c.value) || "all");
url += "&access=" + (((_d = filters === null || filters === void 0 ? void 0 : filters.access) === null || _d === void 0 ? void 0 : _d.value) || "all");
url += "&adult=" + (((_e = filters === null || filters === void 0 ? void 0 : filters.adult) === null || _e === void 0 ? void 0 : _e.value) || "hide");
if ((_h = (_g = (_f = filters === null || filters === void 0 ? void 0 : filters.genre) === null || _f === void 0 ? void 0 : _f.value) === null || _g === void 0 ? void 0 : _g.include) === null || _h === void 0 ? void 0 : _h.length) {
url += filters.genre.value.include
.map(function (id) { return '&genres_included[]=' + id; }).join("");
}
if ((_l = (_k = (_j = filters === null || filters === void 0 ? void 0 : filters.genre) === null || _j === void 0 ? void 0 : _j.value) === null || _k === void 0 ? void 0 : _k.exclude) === null || _l === void 0 ? void 0 : _l.length) {
url += filters.genre.value.exclude
.map(function (id) { return '&genres_excluded[]=' + id; }).join("");
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _m.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 body, loadedCheerio, novel, chapters;
return __generator(this, function (_c) {
switch (_c.label) {
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)(novelUrl).then(function (res) { return res.text(); })];
case 1:
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("a.chapter-line").each(function () {
var name = loadedCheerio(this).find("h6").text();
var releaseTime = loadedCheerio(this).find('span[class="date"]').text();
var url = loadedCheerio(this).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 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);
loadedCheerio("div.mobile-block").remove();
loadedCheerio("div.standart-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, 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).then(function (res) { return res.text(); })];
case 1:
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
+390
View File
@@ -0,0 +1,390 @@
"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 = {
sort: {
label: "Сортировка",
value: "",
options: [
{ label: "По популярности", value: "popular" },
{ label: "По количеству лайков", value: "likes" },
{ label: "По комментариям", value: "comments" },
{ label: "По новизне", value: "recent" },
{ label: "По просмотрам", value: "views" },
{ label: "Набирающие популярность", value: "trending" },
],
type: filterInputs_1.FilterTypes.Picker,
},
genre: {
label: "Жанры",
value: "",
options: [
{ 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" },
],
type: filterInputs_1.FilterTypes.Picker,
},
form: {
label: "Форма произведения",
value: "",
options: [
{ label: "Любой", value: "any" },
{ label: "Перевод", value: "translation" },
{ label: "Повесть", value: "tale" },
{ label: "Рассказ", value: "story" },
{ label: "Роман", value: "novel" },
{ label: "Сборник поэзии", value: "poetry" },
{ label: "Сборник рассказов", value: "story-book" },
],
type: filterInputs_1.FilterTypes.Picker,
},
state: {
label: "Статус произведения",
value: "",
options: [
{ label: "Любой статус", value: "any" },
{ label: "В процессе", value: "in-progress" },
{ label: "Завершено", value: "finished" },
],
type: filterInputs_1.FilterTypes.Picker,
},
series: {
label: "Статус цикла",
value: "",
options: [
{ label: "Не важно", value: "any" },
{ label: "Вне цикла", value: "out" },
{ label: "Цикл завершен", value: "finished" },
{ label: "Цикл не завершен", value: "unfinished" },
],
type: filterInputs_1.FilterTypes.Picker,
},
access: {
label: "Тип доступа",
value: "",
options: [
{ label: "Любой", value: "any" },
{ label: "Платный", value: "paid" },
{ label: "Бесплатный", value: "free" },
],
type: filterInputs_1.FilterTypes.Picker,
},
promo: {
label: "Промо-фрагмент",
value: "",
options: [
{ label: "Скрывать", value: "hide" },
{ label: "Показывать", value: "show" },
],
type: filterInputs_1.FilterTypes.Picker,
},
};
}
AuthorToday.prototype.popularNovels = function (pageNo, _a) {
var _b, _c, _d, _e, _f, _g, _h, _j;
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 (_k) {
switch (_k.label) {
case 0:
url = apiUrl + "v1/catalog/search?page=" + pageNo;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genre) === null || _b === void 0 ? void 0 : _b.value) {
url += "&genre=" + filters.genre.value;
}
url +=
"&sorting=" + (showLatestNovels ? "recent" : ((_c = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _c === void 0 ? void 0 : _c.value) || "popular");
url += "&form=" + (((_d = filters === null || filters === void 0 ? void 0 : filters.form) === null || _d === void 0 ? void 0 : _d.value) || "any");
url += "&state=" + (((_e = filters === null || filters === void 0 ? void 0 : filters.state) === null || _e === void 0 ? void 0 : _e.value) || "any");
url += "&series=" + (((_f = filters === null || filters === void 0 ? void 0 : filters.series) === null || _f === void 0 ? void 0 : _f.value) || "any");
url += "&access=" + (((_g = filters === null || filters === void 0 ? void 0 : filters.access) === null || _g === void 0 ? void 0 : _g.value) || "any");
url += "&promo=" + (((_h = filters === null || filters === void 0 ? void 0 : filters.promo) === null || _h === void 0 ? void 0 : _h.value) || "hide");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, {
headers: {
Authorization: token,
},
})];
case 1:
result = _k.sent();
return [4 /*yield*/, result.json()];
case 2:
json = (_k.sent());
novels = [];
if ((json === null || json === void 0 ? void 0 : json.code) === "NotFound") {
return [2 /*return*/, novels];
}
(_j = json === null || json === void 0 ? void 0 : json.searchResults) === null || _j === void 0 ? void 0 : _j.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();
+261
View File
@@ -0,0 +1,261 @@
"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 = {
sort: {
label: "Сортировка",
value: "",
options: [
{ label: "Бестселлеры", value: "bestseller" },
{ label: "Дате добавления", value: "newest" },
{ label: "Дате обновления", value: "last-update" },
],
type: filterInputs_1.FilterTypes.Picker,
},
genres: {
label: "жанры",
value: [],
options: [
{ 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" },
],
type: filterInputs_1.FilterTypes.CheckboxGroup,
},
};
}
Bookriver.prototype.popularNovels = function (pageNo, _a) {
var _b, _c, _d, _e, _f, _g;
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 (_h) {
switch (_h.label) {
case 0:
url = this.site + "/genre?page=".concat(pageNo, "&perPage=24&sortingType=");
url += showLatestNovels
? "last-update"
: ((_b = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _b === void 0 ? void 0 : _b.value) || "bestseller";
if (((_c = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _c === void 0 ? void 0 : _c.value) instanceof Array && ((_d = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _d === void 0 ? void 0 : _d.value.length)) {
url += "&g=" + filters.genres.value.join(",");
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(url)];
case 1:
result = _h.sent();
return [4 /*yield*/, result.text()];
case 2:
body = _h.sent();
loadedCheerio = (0, cheerio_1.load)(body);
novels = [];
jsonRaw = loadedCheerio("#__NEXT_DATA__").html();
if (jsonRaw) {
json = JSON.parse(jsonRaw);
(_g = (_f = (_e = json.props.pageProps.state.pagesFilter) === null || _e === void 0 ? void 0 : _e.genre) === null || _f === void 0 ? void 0 : _f.books) === null || _g === void 0 ? void 0 : _g.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
+310
View File
@@ -0,0 +1,310 @@
"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 = {
sortby: {
label: "Сортировка:",
value: "topweek",
options: [
{ 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" },
],
type: filterInputs_1.FilterTypes.Picker,
},
sortdaycreate: {
label: "Дата добавления:",
value: "1",
options: [
{ 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" },
],
type: filterInputs_1.FilterTypes.Picker,
},
sortcountchapt: {
label: "Количество глав:",
value: "1",
options: [
{ 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" },
],
type: filterInputs_1.FilterTypes.Picker,
},
genre: {
label: "Жанры:",
value: { include: [], exclude: [] },
options: [
{ 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" },
],
type: filterInputs_1.FilterTypes.ExcludableCheckboxGroup,
},
lang: {
label: "Выбрать языки:",
value: [],
options: [
{ label: "Английский", value: "Английский" },
{ label: "Китайский", value: "Китайский" },
{ label: "Корейский", value: "Корейский" },
{ label: "Японский", value: "Японский" },
],
type: filterInputs_1.FilterTypes.CheckboxGroup,
},
};
}
Jaomix.prototype.popularNovels = function (pageNo, _a) {
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
var showLatestNovels = _a.showLatestNovels, filters = _a.filters;
return __awaiter(this, void 0, void 0, function () {
var url, body, loadedCheerio, novels;
return __generator(this, function (_o) {
switch (_o.label) {
case 0:
url = this.site + "/?searchrn";
if ((_c = (_b = filters === null || filters === void 0 ? void 0 : filters.lang) === null || _b === void 0 ? void 0 : _b.value) === null || _c === void 0 ? void 0 : _c.length) {
url += filters.lang.value
.map(function (lang, idx) { return "&lang[".concat(idx, "]=").concat(lang); }).join("");
}
if ((_f = (_e = (_d = filters === null || filters === void 0 ? void 0 : filters.genre) === null || _d === void 0 ? void 0 : _d.value) === null || _e === void 0 ? void 0 : _e.include) === null || _f === void 0 ? void 0 : _f.length) {
url += filters.genre.value.include
.map(function (genre, idx) { return "&genre[".concat(idx, "]=").concat(genre); }).join("");
}
if ((_j = (_h = (_g = filters === null || filters === void 0 ? void 0 : filters.genre) === null || _g === void 0 ? void 0 : _g.value) === null || _h === void 0 ? void 0 : _h.exclude) === null || _j === void 0 ? void 0 : _j.length) {
url += filters.genre.value.exclude
.map(function (genre, idx) { return "&delgenre[".concat(idx, "]=del ").concat(genre); }).join("");
}
url += "&sortcountchapt=" + (((_k = filters === null || filters === void 0 ? void 0 : filters.sortcountchapt) === null || _k === void 0 ? void 0 : _k.value) || "1");
url += "&sortdaycreate=" + (((_l = filters === null || filters === void 0 ? void 0 : filters.sortdaycreate) === null || _l === void 0 ? void 0 : _l.value) || "1");
url +=
"&sortby=" + (showLatestNovels ? "upd" : ((_m = filters === null || filters === void 0 ? void 0 : filters.sortby) === null || _m === void 0 ? void 0 : _m.value) || "topweek");
url += "&gpage=" + pageNo;
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _o.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 body, loadedCheerio, novel, chapters;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)(novelUrl).then(function (res) { return res.text(); })];
case 1:
body = _a.sent();
loadedCheerio = (0, cheerio_1.load)(body);
novel = {
url: novelUrl,
name: loadedCheerio('div[class="desc-book"] > h1').text().trim(),
cover: loadedCheerio('div[class="img-book"] > img').attr("src"),
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 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);
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, 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).then(function (res) { return res.text(); })];
case 1:
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();
+940
View File
@@ -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 = {
tags: {
label: "Тэги",
value: [],
options: [
{ 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" },
],
type: filterInputs_1.FilterTypes.CheckboxGroup,
},
genres: {
label: "Жанры",
value: [],
options: [
{ 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" },
],
type: filterInputs_1.FilterTypes.CheckboxGroup,
},
};
}
TL.prototype.popularNovels = function (page, _a) {
var _b, _c, _d, _e, _f;
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 (_g) {
switch (_g.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: ((_b = filters === null || filters === void 0 ? void 0 : filters.tags) === null || _b === void 0 ? void 0 : _b.value) || [],
genres: ((_c = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _c === void 0 ? void 0 : _c.value) || [],
},
hostname: "novel.tl",
limit: 40,
page: page,
},
}),
})];
case 1:
result = _g.sent();
return [4 /*yield*/, result.json()];
case 2:
json = (_g.sent());
novels = [];
(_f = (_e = (_d = json.data) === null || _d === void 0 ? void 0 : _d.projects) === null || _e === void 0 ? void 0 : _e.content) === null || _f === void 0 ? void 0 : _f.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
+462
View File
@@ -0,0 +1,462 @@
"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 = {
sort: {
label: "Сортировка",
value: "",
options: [
{ label: "Рейтинг", value: "rate" },
{ label: "Имя", value: "name" },
{ label: "Просмотры", value: "views" },
{ label: "Дате добавления", value: "created_at" },
{ label: "Дате обновления", value: "last_chapter_at" },
{ label: "Количество глав", value: "chap_count" },
],
type: filterInputs_1.FilterTypes.Picker,
},
order: {
label: "Порядок",
value: "",
options: [
{ label: "По убыванию", value: "desc" },
{ label: "По возрастанию", value: "asc" },
],
type: filterInputs_1.FilterTypes.Picker,
},
type: {
label: "Тип",
value: [],
options: [
{ label: "Авторский", value: "14" },
{ label: "Английский", value: "13" },
{ label: "Китай", value: "12" },
{ label: "Корея", value: "11" },
{ label: "Фанфик", value: "15" },
{ label: "Япония", value: "10" },
],
type: filterInputs_1.FilterTypes.CheckboxGroup,
},
format: {
label: "Формат выпуска",
value: { include: [], exclude: [] },
options: [
{ label: "4-кома (Ёнкома)", value: "1" },
{ label: "В цвете", value: "4" },
{ label: "Веб", value: "6" },
{ label: "Вебтун", value: "7" },
{ label: "Додзинси", value: "3" },
{ label: "Сборник", value: "2" },
{ label: "Сингл", value: "5" },
],
type: filterInputs_1.FilterTypes.ExcludableCheckboxGroup,
},
status: {
label: "Статус перевода",
value: [],
options: [
{ label: "Продолжается", value: "1" },
{ label: "Завершен", value: "2" },
{ label: "Заморожен", value: "3" },
{ label: "Заброшен", value: "4" },
],
type: filterInputs_1.FilterTypes.CheckboxGroup,
},
statuss: {
label: "Статус тайтла",
value: [],
options: [
{ label: "Онгоинг", value: "1" },
{ label: "Завершён", value: "2" },
{ label: "Анонс", value: "3" },
{ label: "Приостановлен", value: "4" },
{ label: "Выпуск прекращён", value: "5" },
],
type: filterInputs_1.FilterTypes.CheckboxGroup,
},
genres: {
label: "Жанры",
value: { include: [], exclude: [] },
options: [
{ 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" },
],
type: filterInputs_1.FilterTypes.ExcludableCheckboxGroup,
},
tags: {
label: "Теги",
value: { include: [], exclude: [] },
options: [
{ 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" },
],
type: filterInputs_1.FilterTypes.ExcludableCheckboxGroup,
},
};
}
RLIB.prototype.popularNovels = function (pageNo, _a) {
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
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 (_5) {
switch (_5.label) {
case 0:
url = "".concat(this.site, "/manga-list?sort=");
url += showLatestNovels
? "last_chapter_at"
: ((_b = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _b === void 0 ? void 0 : _b.value) || "rate";
url += "&dir=" + (((_c = filters === null || filters === void 0 ? void 0 : filters.order) === null || _c === void 0 ? void 0 : _c.value) || "desc");
if ((_e = (_d = filters.type) === null || _d === void 0 ? void 0 : _d.value) === null || _e === void 0 ? void 0 : _e.length) {
url += filters.type.value.map(function (i) { return "&types[]=" + i; }).join("");
}
if ((_h = (_g = (_f = filters.format) === null || _f === void 0 ? void 0 : _f.value) === null || _g === void 0 ? void 0 : _g.include) === null || _h === void 0 ? void 0 : _h.length) {
url += filters.format.value.include
.map(function (i) { return "&format[include][]=" + i; }).join("");
}
if ((_l = (_k = (_j = filters.format) === null || _j === void 0 ? void 0 : _j.value) === null || _k === void 0 ? void 0 : _k.exclude) === null || _l === void 0 ? void 0 : _l.length) {
url += filters.format.value.exclude
.map(function (i) { return "&format[exclude][]=" + i; }).join("");
}
if ((_o = (_m = filters.status) === null || _m === void 0 ? void 0 : _m.value) === null || _o === void 0 ? void 0 : _o.length) {
url += filters.status.value.map(function (i) { return "&status[]=" + i; }).join("");
}
if ((_q = (_p = filters.statuss) === null || _p === void 0 ? void 0 : _p.value) === null || _q === void 0 ? void 0 : _q.length) {
url += filters.statuss.value.map(function (i) { return "&manga_status[]=" + i; }).join("");
}
if ((_t = (_s = (_r = filters.genres) === null || _r === void 0 ? void 0 : _r.value) === null || _s === void 0 ? void 0 : _s.include) === null || _t === void 0 ? void 0 : _t.length) {
url += filters.genres.value.include
.map(function (i) { return "&genres[include][]=" + i; }).join("");
}
if ((_w = (_v = (_u = filters.genres) === null || _u === void 0 ? void 0 : _u.value) === null || _v === void 0 ? void 0 : _v.exclude) === null || _w === void 0 ? void 0 : _w.length) {
url += filters.genres.value.exclude
.map(function (i) { return "&genres[exclude][]=" + i; }).join("");
}
if ((_z = (_y = (_x = filters.tags) === null || _x === void 0 ? void 0 : _x.value) === null || _y === void 0 ? void 0 : _y.include) === null || _z === void 0 ? void 0 : _z.length) {
url += filters.tags.value.include
.map(function (i) { return "&tags[include][]=" + i; }).join("");
}
if ((_2 = (_1 = (_0 = filters.tags) === null || _0 === void 0 ? void 0 : _0.value) === null || _1 === void 0 ? void 0 : _1.exclude) === null || _2 === void 0 ? void 0 : _2.length) {
url += filters.tags.value.exclude
.map(function (i) { return "&tags[exclude][]=" + i; }).join("");
}
url += "&page=" + pageNo;
return [4 /*yield*/, (0, fetch_1.fetchApi)(url)];
case 1:
result = _5.sent();
return [4 /*yield*/, result.text()];
case 2:
body = _5.sent();
loadedCheerio = (0, cheerio_1.load)(body);
this.ui = (_4 = (_3 = loadedCheerio("a.header-right-menu__item")
.attr("href")) === null || _3 === void 0 ? void 0 : _3.replace) === null || _4 === void 0 ? void 0 : _4.call(_3, /[^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._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._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=" + 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();
+218
View File
@@ -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 = {
sort: {
label: "Сортировка",
value: "",
options: [
{ label: "Рейтинг", value: "popular" },
{ label: "Дате добавления", value: "new" },
{ label: "Дате обновления", value: "lastPublishedChapter" },
{ label: "Законченные", value: "completed" },
],
type: filterInputs_1.FilterTypes.Picker,
},
};
}
RNRF.prototype.popularNovels = function (pageNo, _a) {
var _b, _c, _d, _e;
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 (_f) {
switch (_f.label) {
case 0:
url = this.site + "/books?order=";
url += showLatestNovels
? "lastPublishedChapter"
: ((_b = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _b === void 0 ? void 0 : _b.value) || "popular";
url += "&page=" + pageNo;
return [4 /*yield*/, (0, fetch_1.fetchApi)(url)];
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 || "{}");
novels = [];
(_e = (_d = (_c = json.props.pageProps) === null || _c === void 0 ? void 0 : _c.totalData) === null || _d === void 0 ? void 0 : _d.items) === null || _e === void 0 ? void 0 : _e.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.isDonate || 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
@@ -0,0 +1,200 @@
"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 fetch_1 = require("@libs/fetch");
var filterInputs_1 = require("@libs/filterInputs");
var novelStatus_1 = require("@libs/novelStatus");
var cheerio_1 = require("cheerio");
var IfreedomPlugin = /** @class */ (function () {
function IfreedomPlugin(metadata) {
this.fetchImage = fetch_1.fetchFile;
this.id = metadata.id;
this.name = metadata.sourceName + "[ifreedom]";
this.icon = "multisrc/ifreedom/icons/".concat(metadata.id, ".png");
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.filters = metadata.filters;
}
IfreedomPlugin.prototype.popularNovels = function (page, _a) {
var _b, _c, _d, _e;
var filters = _a.filters, showLatestNovels = _a.showLatestNovels;
return __awaiter(this, void 0, void 0, function () {
var url, body, loadedCheerio, novels;
return __generator(this, function (_f) {
switch (_f.label) {
case 0:
url = this.site + "/vse-knigi/?sort=" +
(showLatestNovels ? "По дате обновления" : ((_b = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _b === void 0 ? void 0 : _b.value) || "По рейтингу");
if (((_c = filters === null || filters === void 0 ? void 0 : filters.status) === null || _c === void 0 ? void 0 : _c.value) instanceof Array) {
url += filters.status.value.map(function (i) { return "&status[]=" + i; }).join("");
}
if (((_d = filters === null || filters === void 0 ? void 0 : filters.lang) === null || _d === void 0 ? void 0 : _d.value) instanceof Array) {
url += filters.lang.value.map(function (i) { return "&lang[]=" + i; }).join("");
}
if (((_e = filters === null || filters === void 0 ? void 0 : filters.genre) === null || _e === void 0 ? void 0 : _e.value) instanceof Array) {
url += filters.genre.value.map(function (i) { return "&genre[]=" + i; }).join("");
}
url += "&bpage=" + page;
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _f.sent();
loadedCheerio = (0, cheerio_1.load)(body);
novels = loadedCheerio("div.one-book-home > div.img-home a")
.map(function (index, element) { return ({
name: loadedCheerio(element).attr("title") || "",
cover: loadedCheerio(element).find("img").attr("src"),
url: loadedCheerio(element).attr("href") || "",
}); })
.get()
.filter(function (novel) { return novel.name && novel.url; });
return [2 /*return*/, novels];
}
});
});
};
IfreedomPlugin.prototype.parseNovelAndChapters = function (novelUrl) {
return __awaiter(this, void 0, void 0, function () {
var body, loadedCheerio, novel, chapters;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, (0, fetch_1.fetchApi)(novelUrl).then(function (res) { return res.text(); })];
case 1:
body = _a.sent();
loadedCheerio = (0, cheerio_1.load)(body);
novel = {
url: novelUrl,
name: loadedCheerio(".entry-title").text(),
cover: loadedCheerio(".img-ranobe > img").attr("src"),
summary: loadedCheerio('meta[name="description"]').attr("content"),
};
loadedCheerio("div.data-ranobe").each(function () {
switch (loadedCheerio(this).find("b").text()) {
case "Автор":
novel.author = loadedCheerio(this)
.find("div.data-value")
.text()
.trim();
break;
case "Жанры":
novel.genres = loadedCheerio("div.data-value > a")
.map(function (index, element) { var _a; return (_a = loadedCheerio(element).text()) === null || _a === void 0 ? void 0 : _a.trim(); })
.get()
.join(",");
break;
case "Статус книги":
novel.status = loadedCheerio("div.data-value")
.text()
.includes("активен")
? novelStatus_1.NovelStatus.Ongoing
: novelStatus_1.NovelStatus.Completed;
break;
}
});
if (novel.author == "Не указан")
delete novel.author;
chapters = [];
loadedCheerio("div.li-ranobe").each(function () {
var name = loadedCheerio(this).find("a").text();
var url = loadedCheerio(this).find("a").attr("href");
if (!loadedCheerio(this).find("label.buy-ranobe").length && name && url) {
var releaseTime = loadedCheerio(this)
.find("div.li-col2-ranobe").text().trim();
chapters.push({ name: name, releaseTime: releaseTime, url: url });
}
});
novel.chapters = chapters.reverse();
return [2 /*return*/, novel];
}
});
});
};
IfreedomPlugin.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);
loadedCheerio(".entry-content img").each(function () {
var _a, _b;
var srcset = (_b = (_a = loadedCheerio(this).attr("srcset")) === null || _a === void 0 ? void 0 : _a.split) === null || _b === void 0 ? void 0 : _b.call(_a, " ");
if (srcset === null || srcset === void 0 ? void 0 : srcset.length) {
var bestlink = srcset.filter(function (url) { return url.startsWith("http"); }).unshift();
if (typeof bestlink == 'string')
loadedCheerio(this).attr("src", bestlink);
}
});
chapterText = loadedCheerio(".entry-content").html() || "";
return [2 /*return*/, chapterText];
}
});
});
};
IfreedomPlugin.prototype.searchNovels = function (searchTerm, page) {
if (page === void 0) { page = 1; }
return __awaiter(this, void 0, void 0, function () {
var url, result, loadedCheerio, novels;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
url = this.site + "/vse-knigi/?searchname=" + searchTerm + "&bpage=" + page;
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
result = _a.sent();
loadedCheerio = (0, cheerio_1.load)(result);
novels = loadedCheerio("div.one-book-home > div.img-home a")
.map(function (index, element) { return ({
name: loadedCheerio(element).attr("title") || "",
cover: loadedCheerio(element).find("img").attr("src"),
url: loadedCheerio(element).attr("href") || "",
}); })
.get()
.filter(function (novel) { return novel.name && novel.url; });
return [2 /*return*/, novels];
}
});
});
};
return IfreedomPlugin;
}());
var plugin = new IfreedomPlugin({ "id": "ifreedom", "sourceSite": "https://ifreedom.su", "sourceName": "Свободный Мир Ранобэ", "filters": { "sort": { "type": filterInputs_1.FilterTypes.Picker, "label": "Сортировка:", "options": [{ "label": "По дате добавления", "value": "По дате добавления" }, { "label": "По дате обновления", "value": "По дате обновления" }, { "label": "По количеству глав", "value": "По количеству глав" }, { "label": "По названию", "value": "По названию" }, { "label": "По просмотрам", "value": "По просмотрам" }, { "label": "По рейтингу", "value": "По рейтингу" }], "value": "По рейтингу" }, "status": { "type": filterInputs_1.FilterTypes.CheckboxGroup, "label": "Статус:", "options": [{ "label": "Перевод активен", "value": "Перевод активен" }, { "label": "Перевод приостановлен", "value": "Перевод приостановлен" }, { "label": "Произведение завершено", "value": "Произведение завершено" }], "value": [] }, "lang": { "type": filterInputs_1.FilterTypes.CheckboxGroup, "label": "Язык:", "options": [{ "label": "Английский", "value": "Английский" }, { "label": "Китайский", "value": "Китайский" }, { "label": "Корейский", "value": "Корейский" }, { "label": "Японский", "value": "Японский" }], "value": [] }, "genre": { "type": filterInputs_1.FilterTypes.CheckboxGroup, "label": "Жанры:", "options": [{ "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": "Школьная жизнь", "value": "Школьная жизнь" }, { "label": "Экшн", "value": "Экшн" }, { "label": "Эротика", "value": "Эротика" }, { "label": "Этти", "value": "Этти" }, { "label": "Яой", "value": "Яой" }, { "label": "Adult", "value": "Adult" }, { "label": "Mature", "value": "Mature" }, { "label": "Xianxia", "value": "Xianxia" }, { "label": "Xuanhuan", "value": "Xuanhuan" }], "value": [] } } });
exports.default = plugin;
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+7 -6
View File
@@ -47,6 +47,7 @@ var novelStatus_1 = require("@libs/novelStatus");
var parseMadaraDate_1 = require("@libs/parseMadaraDate");
var dayjs_1 = __importDefault(require("dayjs"));
var MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -76,20 +77,20 @@ var MadaraPlugin = /** @class */ (function () {
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;
if ((_b = filters === null || filters === void 0 ? void 0 : filters.genres) === null || _b === void 0 ? void 0 : _b.value) {
url += (((_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.path) === null || _d === void 0 ? void 0 : _d.genres) || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
}
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 += ((_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.path) === null || _f === void 0 ? void 0 : _f.novels) || MadaraDefaultPath.novels;
}
url +=
"/page/" +
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : (filters === null || filters === void 0 ? void 0 : filters.sort) || "rating");
(showLatestNovels ? "latest" : ((_g = filters === null || filters === void 0 ? void 0 : filters.sort) === null || _g === void 0 ? void 0 : _g.value) || "rating");
return [4 /*yield*/, (0, fetch_1.fetchApi)(url).then(function (res) { return res.text(); })];
case 1:
body = _h.sent();
+1 -1
View File
@@ -113,7 +113,7 @@ var Smakolykytl = /** @class */ (function () {
.flat()
.map(function (tags) { return tags === null || tags === void 0 ? void 0 : tags.title; })
.filter(function (tags) { return tags; });
if (tags.length > 0) {
if (tags.length) {
novel.genres = tags.join(", ");
}
chapters = [];
Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

+1
View File
@@ -9,6 +9,7 @@ export async function fetchApi(
"User-Agent": defaultUserAgentString,
...init?.headers,
};
console.log(url, { ...init, headers })
return await fetch(url, { ...init, headers });
}
+8 -7
View File
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
+8 -7
View File
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
+8 -7
View File
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
+145 -159
View File
@@ -1,166 +1,152 @@
import { CheerioAPI, load } from "cheerio";
import { fetchApi, fetchFile } from "@libs/fetch";
import { Plugin } from "@typings/plugin";
import { NovelStatus } from "@libs/novelStatus";
class LightNovelFRPlugin implements Plugin.PluginBase {
id: string;
name: string;
icon: string;
site: string;
version: string;
userAgent: string;
cookieString: string;
constructor() {
this.id = "kol-novel";
this.name = "Kol Novel[wpmangastream]";
this.icon = "multisrc/wpmangastream/icons/kol-novel.png";
this.site = "https://kolnovel.com/";
this.version = "1.0.0";
this.userAgent = "''";
this.cookieString = "''";
}
async popularNovels(page: number): Promise<Plugin.NovelItem[]> {
let url = this.site + 'series/?page=' + page + '&status=&order=popular';
const body = await(await fetchApi(url, {})).text();
const loadedCheerio = load(body);
let novels: Plugin.NovelItem[] = [];
loadedCheerio('article.maindet').each(function () {
const novelName = loadedCheerio(this).find('h2').text();
let image = loadedCheerio(this).find('img');
const novelCover = image.attr('data-src') || image.attr('src');
const novelUrl = loadedCheerio(this).find('h2 a').attr('href');
if (!novelUrl) return;
const novel = {
name: novelName,
cover: novelCover,
url: novelUrl,
};
novels.push(novel);
});
return novels;
}
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> {
const url = novelUrl;
const body = await(await fetchApi(url, {})).text();
let loadedCheerio = load(body);
const novel: Plugin.SourceNovel = { url };
// novel.url = url;
novel.name = loadedCheerio('h1.entry-title').text();
novel.cover =
loadedCheerio('img.wp-post-image').attr('data-src') ||
loadedCheerio('img.wp-post-image').attr('src');
novel.status = loadedCheerio('div.sertostat > span').attr('class');
loadedCheerio('div.serl > span').each(function () {
const detailName = loadedCheerio(this).text().trim();
const detail = loadedCheerio(this).next().text().trim();
switch (detailName) {
case 'الكاتب':
case 'Author':
case 'Auteur':
novel.author = detail;
break;
}
});
novel.genres = loadedCheerio('.sertogenre')
.children('a')
.map((i, el) => loadedCheerio(el).text())
.toArray()
.join(',');
let summary = loadedCheerio('.sersys > p').siblings().remove("div").end();
novel.summary = ""
for (let i = 0; i < summary.length; i++) {
const p = summary[i];
novel.summary += loadedCheerio(p).text().trim() + "\n\n";
}
let novelChapters:Plugin.ChapterItem[] = [];
loadedCheerio('.eplister')
.find('li')
.each(function () {
const chapterName =
loadedCheerio(this).find('.epl-num').text() +
' - ' +
loadedCheerio(this).find('.epl-title').text();
const releaseDate = loadedCheerio(this).find('.epl-date').text().trim();
const chapterUrl = loadedCheerio(this).find('a').attr('href');
if (!chapterUrl) return;
const chapter = {
name: chapterName,
url: chapterUrl,
releaseDate,
};
novelChapters.push(chapter);
});
novel.chapters = novelChapters;
if (novel.chapters) novel.chapters.reverse()
return novel;
}
async parseChapter(chapterUrl: string): Promise<string> {
const url = chapterUrl;
const body = await(await fetchApi(url, {})).text();
const loadedCheerio = load(body);
let chapterText = loadedCheerio('.epcontent').html() || '';
return chapterText;
};
async searchNovels(searchTerm: string): Promise<Plugin.NovelItem[]> {
const url = this.site + "?s=" + searchTerm;
const body = await(await fetchApi(url, {})).text();
const loadedCheerio = load(body);
let novels: Plugin.NovelItem[] = [];
loadedCheerio('article.maindet').each(function () {
const novelName = loadedCheerio(this).find('h2').text();
let image = loadedCheerio(this).find('img');
const novelCover = image.attr('data-src') || image.attr('src');
const novelUrl = loadedCheerio(this).find('h2 a').attr('href');
if (!novelUrl) return;
const novel = {
name: novelName,
cover: novelCover,
url: novelUrl,
};
novels.push(novel);
});
return novels;
};
async fetchImage(url: string): Promise<string | undefined>{
return await fetchFile(url);
}
interface WPmangaStreamOptions {
reverseChapters?: boolean;
lang?: string;
}
export default new LightNovelFRPlugin();
export interface WPmangaStreamMetadata {
id: string;
sourceSite: string;
sourceName: string;
options?: WPmangaStreamOptions;
}
class WPmangaStreamPlugin implements Plugin.PluginBase {
id: string;
name: string;
icon: string;
site: string;
version: string;
userAgent: string;
cookieString: string;
options?: WPmangaStreamOptions;
constructor(metadata: WPmangaStreamMetadata) {
this.id = metadata.id;
this.name = metadata.sourceName + "[wpmangastream]";
this.icon = `multisrc/wpmangastream/icons/${metadata.id}.png`;
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
}
async popularNovels(page: number): Promise<Plugin.NovelItem[]> {
const url = this.site + "series/?page=" + page + "&status=&order=popular";
const body = await fetchApi(url).then((res) => res.text());
const loadedCheerio = load(body);
const novels: Plugin.NovelItem[] = [];
loadedCheerio("article.maindet").each(function () {
const name = loadedCheerio(this).find("h2").text();
const image = loadedCheerio(this).find("img");
const url = loadedCheerio(this).find("h2 a").attr("href");
if (!url) return;
novels.push({
name,
cover: image.attr("data-src") || image.attr("src"),
url,
});
});
return novels;
}
async parseNovelAndChapters(url: string): Promise<Plugin.SourceNovel> {
const body = await fetchApi(url).then((res) => res.text());
const loadedCheerio = load(body);
const novel: Plugin.SourceNovel = { url };
// novel.url = url;
novel.name = loadedCheerio("h1.entry-title").text();
novel.cover =
loadedCheerio("img.wp-post-image").attr("data-src") ||
loadedCheerio("img.wp-post-image").attr("src");
novel.status = loadedCheerio("div.sertostat > span").attr("class");
loadedCheerio("div.serl > span").each(function () {
const detailName = loadedCheerio(this).text().trim();
const detail = loadedCheerio(this).next().text().trim();
switch (detailName) {
case "الكاتب":
case "Author":
case "Auteur":
novel.author = detail;
break;
}
});
novel.genres = loadedCheerio(".sertogenre")
.children("a")
.map((i, el) => loadedCheerio(el).text())
.toArray()
.join(",");
let summary = loadedCheerio(".sersys > p").siblings().remove("div").end();
novel.summary = "";
for (let i = 0; i < summary.length; i++) {
const p = summary[i];
novel.summary += loadedCheerio(p).text().trim() + "\\n\\n";
}
const chapters: Plugin.ChapterItem[] = loadedCheerio(".eplister li")
.map((index, element) => ({
name:
loadedCheerio(element).find(".epl-num").text() +
loadedCheerio(element).find(".epl-title").text(),
releaseTime: loadedCheerio(element).find(".epl-date").text().trim(),
url: loadedCheerio(element).find("a").attr("href") || "",
}))
.get()
.filter((chapter) => chapter.name && chapter.url);
if (this.options?.reverseChapters && chapters.length) chapters.reverse();
novel.chapters = chapters;
return novel;
}
async parseChapter(chapterUrl: string): Promise<string> {
const body = await fetchApi(chapterUrl).then((res) => res.text());
const loadedCheerio = load(body);
const chapterText = loadedCheerio(".epcontent").html() || "";
return chapterText;
}
async searchNovels(searchTerm: string): Promise<Plugin.NovelItem[]> {
const url = this.site + "?s=" + searchTerm;
const body = await fetchApi(url).then((res) => res.text());
const loadedCheerio = load(body);
const novels: Plugin.NovelItem[] = [];
loadedCheerio("article.maindet").each(function () {
const name = loadedCheerio(this).find("h2").text();
const image = loadedCheerio(this).find("img");
const url = loadedCheerio(this).find("h2 a").attr("href");
if (!url) return;
novels.push({
name,
cover: image.attr("data-src") || image.attr("src"),
url,
});
});
return novels;
}
fetchImage = fetchFile;
}
const plugin = new WPmangaStreamPlugin({"id":"kol-novel","sourceSite":"https://kolnovel.com/","sourceName":"Kol Novel","options":{"lang":"arabic","reverseChapters":true}});
export default plugin;
+8 -7
View File
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
+8 -7
View File
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
+8 -7
View File
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
+8 -7
View File
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
+8 -7
View File
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
+8 -7
View File
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
+8 -7
View File
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
+8 -7
View File
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
+8 -7
View File
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
+8 -7
View File
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
+8 -7
View File
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
+8 -7
View File
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
File diff suppressed because one or more lines are too long
+8 -7
View File
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
+8 -7
View File
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
+8 -7
View File
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
+8 -7
View File
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
+8 -7
View File
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
+8 -7
View File
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
+8 -7
View File
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
+8 -7
View File
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
+8 -7
View File
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
+8 -7
View File
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());
+8 -7
View File
@@ -15,7 +15,8 @@ interface MadaraOptionPath {
chapter?: string;
}
const MadaraDefaultPath: MadaraOptionPath = {
const MadaraDefaultPath = {
genres: "novel-genre",
novels: "novel",
novel: "novel",
chapter: "novel",
@@ -70,12 +71,12 @@ class MadaraPlugin implements Plugin.PluginBase {
const novels: Plugin.NovelItem[] = [];
let url = this.site;
if (filters?.genres && this.options?.path?.genres) {
url += this.options?.path?.genres + filters.genres;
if (filters?.genres?.value) {
url += (this.options?.path?.genres || MadaraDefaultPath.genres) +
"/" +
filters.genres.value;
} else {
url += this.options?.path?.novels
? this.options.path.novels
: MadaraDefaultPath.novels;
url += this.options?.path?.novels || MadaraDefaultPath.novels;
}
url +=
@@ -83,7 +84,7 @@ class MadaraPlugin implements Plugin.PluginBase {
pageNo +
"/" +
"?m_orderby=" +
(showLatestNovels ? "latest" : filters?.sort || "rating");
(showLatestNovels ? "latest" : filters?.sort?.value || "rating");
const body = await fetchApi(url).then((res) => res.text());

Some files were not shown because too many files have changed in this diff Show More