Merge pull request #690 from nyagami/fix-plugins

New feats
This commit is contained in:
nyagami
2024-01-15 12:12:16 +07:00
committed by GitHub
116 changed files with 12541 additions and 11937 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/nyagami/plugins/fix-plugins/.js/plugins/arabic/ArMTL[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/arabic/ArNovel[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/arabic/HizoManga[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/arabic/KolNovel[wpmangastream].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/arabic/kolnovel.js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/arabic/Novel4Up[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/arabic/Riwyat[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/arabic/TeamXNovel[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/chinese/linovelib.js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/FirstKissNovel[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/bestlightnovel.js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/BoxNovel[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/ClickNovel[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/CrateNovel[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/DaoNovel[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/FansTranslations[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/FreeNovelMe[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/filterTests.js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/freewebnovel.js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/Guavaread[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/LightNovelHeaven[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/Ltnovel[readwn].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/LunarLetters[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/MostNovel[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/MTLNovel[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/MTLNovelClub[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/MysticalSeries[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/NeoSekaiTranslations[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/nobleMTL.js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/NocturneTranslations[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/NoobchanTranslation[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/NovelMultiverse[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/NovelR18[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/Novelroomnet[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/Novelstic[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/NovelTranslate[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/OnlyMTL[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/pandaMTL.js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/ReadWebNovels[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/SleepyTranslations[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/SonicMTL[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/SugarBabies[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/SweetEscapeTranslations[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/WebNovelLover[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/Wuxiacity[readwn].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/Wuxiap[readwn].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/WuxiaWorldSite[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/ZetroTranslation[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/english/ZinnNovel[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/french/chireads.js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/french/LighNovelFR[wpmangastream].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/french/noveldeglace.js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/indonesian/MeioNovel[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/indonesian/MoreNovel[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/indonesian/WBNovel[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/portuguese/lightnovelbrasil.js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-plugins/icons/multisrc/wpmangastream/icons/lightnovelbrasil.png"
}
],
"русский язык": [
{
"id": "AT",
"name": "Автор Тудей",
"site": "https://author.today",
"lang": "русский язык",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/nyagami/plugins/fix-plugins/.js/plugins/russian/authortoday.js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/russian/Bookhamster[ifreedom].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/russian/bookriver.js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/russian/Erolate[rulate].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/russian/ficbook.js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/russian/LitSpace.js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/russian/СвободныйМирРанобэ[ifreedom].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/russian/jaomix.js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/russian/renovels.js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/russian/ranobelib.js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/russian/ranobehub.js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-plugins/icons/src/ru/ranobehub/icon.png"
},
{
"id": "RNRF",
"name": "РанобэРФ",
"site": "https://ранобэ.рф",
"lang": "русский язык",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/nyagami/plugins/fix-plugins/.js/plugins/russian/ranoberf.js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/russian/novelTL.js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/russian/Rulate[rulate].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/spanish/tunovelaligera.js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/turkish/lshnovel.js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/turkish/TurkceLightNovels[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/turkish/WebNovelOku[madara].js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-plugins/icons/multisrc/madara/icons/webnoveloku.png"
}
],
"Україна": [
{
"id": "smakolykytl",
"name": "Смаколики",
"site": "https://smakolykytl.site/",
"lang": "Україна",
"version": "1.0.0",
"url": "https://raw.githubusercontent.com/nyagami/plugins/fix-plugins/.js/plugins/ukraine/smakolykytl.js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-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/nyagami/plugins/fix-plugins/.js/plugins/vietnamese/LNHako.js",
"iconUrl": "https://raw.githubusercontent.com/nyagami/plugins/fix-plugins/icons/src/vi/hakolightnovel/icon.png"
}
]
}
File diff suppressed because one or more lines are too long
-1
View File
@@ -62,7 +62,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
-1
View File
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
-1
View File
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
@@ -47,7 +47,6 @@ var WPmangaStreamPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
}
WPmangaStreamPlugin.prototype.popularNovels = function (page) {
-1
View File
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
-1
View File
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
-1
View File
@@ -62,7 +62,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
-13
View File
@@ -47,7 +47,6 @@ var KolNovel = /** @class */ (function () {
this.site = "https://kolnovel.lol/";
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.filters = {
order: {
label: "ترتيب حسب",
@@ -148,9 +147,6 @@ var KolNovel = /** @class */ (function () {
link += "&status=" + ((filters === null || filters === void 0 ? void 0 : filters.status) ? filters.status : "");
link += "&order=" + ((filters === null || filters === void 0 ? void 0 : filters.order) ? filters.order : "popular");
headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(link, { headers: headers }).then(function (result) {
return result.text();
})];
@@ -185,9 +181,6 @@ var KolNovel = /** @class */ (function () {
case 0:
url = novelUrl;
headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, fetch(url, { headers: headers })];
case 1:
result = _a.sent();
@@ -258,9 +251,6 @@ var KolNovel = /** @class */ (function () {
switch (_b.label) {
case 0:
headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, fetch(chapterUrl, { headers: headers })];
case 1:
result = _b.sent();
@@ -286,9 +276,6 @@ var KolNovel = /** @class */ (function () {
case 0:
url = "".concat(this.site, "?s=").concat(searchTerm);
headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })];
case 1:
result = _a.sent();
-13
View File
@@ -48,7 +48,6 @@ var Linovelib = /** @class */ (function () {
this.site = "https://w.linovelib.com";
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.filters = {
sort: {
label: "Sort By",
@@ -83,9 +82,6 @@ var Linovelib = /** @class */ (function () {
link += filters.sort;
link += "/".concat(pageNo, ".html");
headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(link, { headers: headers }).then(function (result) {
return result.text();
})];
@@ -124,9 +120,6 @@ var Linovelib = /** @class */ (function () {
case 0:
url = novelUrl;
headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })];
case 1:
result = _b.sent();
@@ -206,9 +199,6 @@ var Linovelib = /** @class */ (function () {
switch (_a.label) {
case 0:
headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
chapterText = "", pageText = "";
pageNumber = 1;
skillgg = {
@@ -416,9 +406,6 @@ var Linovelib = /** @class */ (function () {
searchUrl = "".concat(this.site, "/search/");
Term = encodeURI(searchTerm);
headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
pageNo = 1;
novels = [];
addPage = function (pageCheerio, redirect) { return __awaiter(_this, void 0, void 0, function () {
-1
View File
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
@@ -62,7 +62,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
@@ -62,7 +62,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
-1
View File
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
-1
View File
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
-1
View File
@@ -50,7 +50,6 @@ var ReadwnPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.filters = metadata.filters;
}
ReadwnPlugin.prototype.popularNovels = function (pageNo, _a) {
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
@@ -62,7 +62,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
-1
View File
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
-1
View File
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
@@ -62,7 +62,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
-1
View File
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
@@ -62,7 +62,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
-1
View File
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
-1
View File
@@ -62,7 +62,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
-1
View File
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
@@ -62,7 +62,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
-1
View File
@@ -50,7 +50,6 @@ var ReadwnPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.filters = metadata.filters;
}
ReadwnPlugin.prototype.popularNovels = function (pageNo, _a) {
-1
View File
@@ -50,7 +50,6 @@ var ReadwnPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.filters = metadata.filters;
}
ReadwnPlugin.prototype.popularNovels = function (pageNo, _a) {
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
-1
View File
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
-1
View File
@@ -48,7 +48,6 @@ var BLN = /** @class */ (function () {
this.site = "https://bestlightnovel.com/";
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
}
BLN.prototype.popularNovels = function (pageNo, options) {
return __awaiter(this, void 0, void 0, function () {
-1
View File
@@ -46,7 +46,6 @@ var FTest = /** @class */ (function () {
this.site = "https://noblemtl.com/";
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.filters = {
picker: {
type: filterInputs_1.FilterTypes.Picker,
-1
View File
@@ -46,7 +46,6 @@ var FreeWebNovel = /** @class */ (function () {
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) {
-13
View File
@@ -47,7 +47,6 @@ var NobleMTL = /** @class */ (function () {
this.site = "https://noblemtl.com/";
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.filters = {
order: {
label: "Sort By",
@@ -196,9 +195,6 @@ var NobleMTL = /** @class */ (function () {
link += "&status=" + filters.status.value;
link += "&order=" + filters.order.value;
headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(link, { headers: headers }).then(function (result) {
return result.text();
})];
@@ -233,9 +229,6 @@ var NobleMTL = /** @class */ (function () {
case 0:
url = novelUrl;
headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })];
case 1:
result = _a.sent();
@@ -311,9 +304,6 @@ var NobleMTL = /** @class */ (function () {
switch (_a.label) {
case 0:
headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(chapterUrl, { headers: headers })];
case 1:
result = _a.sent();
@@ -335,9 +325,6 @@ var NobleMTL = /** @class */ (function () {
case 0:
url = "".concat(this.site, "?s=").concat(searchTerm);
headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })];
case 1:
result = _a.sent();
-13
View File
@@ -47,7 +47,6 @@ var PandaMTL = /** @class */ (function () {
this.site = "https://pandamtl.com/";
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.filters = {
order: {
label: "Sort By",
@@ -126,9 +125,6 @@ var PandaMTL = /** @class */ (function () {
link += "&status=" + ((filters === null || filters === void 0 ? void 0 : filters.status) ? filters.status : "");
link += "&order=" + ((filters === null || filters === void 0 ? void 0 : filters.order) ? filters.order : "popular");
headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(link, { headers: headers }).then(function (result) {
return result.text();
})];
@@ -163,9 +159,6 @@ var PandaMTL = /** @class */ (function () {
case 0:
url = novelUrl;
headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })];
case 1:
result = _a.sent();
@@ -234,9 +227,6 @@ var PandaMTL = /** @class */ (function () {
switch (_a.label) {
case 0:
headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(chapterUrl, { headers: headers })];
case 1:
result = _a.sent();
@@ -258,9 +248,6 @@ var PandaMTL = /** @class */ (function () {
case 0:
url = "".concat(this.site, "?s=").concat(searchTerm);
headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })];
case 1:
result = _a.sent();
@@ -47,7 +47,6 @@ var WPmangaStreamPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
}
WPmangaStreamPlugin.prototype.popularNovels = function (page) {
-1
View File
@@ -46,7 +46,6 @@ var ChireadsPlugin = /** @class */ (function () {
this.site = "https://chireads.com";
this.version = "1.0.0";
this.userAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36";
this.cookieString = "''";
}
ChireadsPlugin.prototype.parseNovels = function (loadedCheerio) {
return [];
-1
View File
@@ -47,7 +47,6 @@ var NovelDeGlacePlugin = /** @class */ (function () {
this.site = "https://noveldeglace.com/";
this.version = "1.0.0";
this.userAgent = "''";
this.cookieString = "''";
}
NovelDeGlacePlugin.prototype.popularNovels = function (page) {
return __awaiter(this, void 0, void 0, function () {
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
@@ -47,7 +47,6 @@ var LightNovelBrasil = /** @class */ (function () {
this.site = "https://lightnovelbrasil.com/";
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.filters = {
order: {
label: "Sort By",
@@ -196,9 +195,6 @@ var LightNovelBrasil = /** @class */ (function () {
link += "&status=" + ((filters === null || filters === void 0 ? void 0 : filters.status) ? filters.status : "");
link += "&order=" + ((filters === null || filters === void 0 ? void 0 : filters.order) ? filters.order : "popular");
headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(link, { headers: headers }).then(function (result) {
return result.text();
})];
@@ -233,9 +229,6 @@ var LightNovelBrasil = /** @class */ (function () {
case 0:
url = novelUrl;
headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })];
case 1:
result = _a.sent();
@@ -312,9 +305,6 @@ var LightNovelBrasil = /** @class */ (function () {
switch (_a.label) {
case 0:
headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(chapterUrl, { headers: headers })];
case 1:
result = _a.sent();
@@ -336,9 +326,6 @@ var LightNovelBrasil = /** @class */ (function () {
case 0:
url = "".concat(this.site, "?s=").concat(searchTerm);
headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })];
case 1:
result = _a.sent();
@@ -49,7 +49,6 @@ var IfreedomPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.filters = metadata.filters;
}
IfreedomPlugin.prototype.popularNovels = function (page, _a) {
-1
View File
@@ -50,7 +50,6 @@ var RulatePlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.filters = metadata.filters;
}
RulatePlugin.prototype.popularNovels = function (pageNo, _a) {
-1
View File
@@ -47,7 +47,6 @@ var freedlit = /** @class */ (function () {
this.version = "1.0.0";
this.icon = "src/ru/freedlit/icon.png";
this.userAgent = "";
this.cookieString = "";
this.fetchImage = fetch_1.fetchFile;
this.filters = {
sort: {
-1
View File
@@ -50,7 +50,6 @@ var RulatePlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.filters = metadata.filters;
}
RulatePlugin.prototype.popularNovels = function (pageNo, _a) {
-1
View File
@@ -55,7 +55,6 @@ var AuthorToday = /** @class */ (function () {
this.site = "https://author.today";
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.fetchImage = fetch_1.fetchFile;
this.filters = {
sort: {
-1
View File
@@ -52,7 +52,6 @@ var Bookriver = /** @class */ (function () {
this.version = "1.0.0";
this.icon = "src/ru/bookriver/icon.png";
this.userAgent = "";
this.cookieString = "";
this.fetchImage = fetch_1.fetchFile;
this.filters = {
sort: {
-1
View File
@@ -49,7 +49,6 @@ var ficbook = /** @class */ (function () {
this.version = "1.0.0";
this.icon = "src/ru/ficbook/icon.png";
this.userAgent = "";
this.cookieString = "";
this.fetchImage = fetch_1.fetchFile;
this.filters = {
sort: {
-1
View File
@@ -48,7 +48,6 @@ var Jaomix = /** @class */ (function () {
this.version = "1.0.0";
this.icon = "src/ru/jaomix/icon.png";
this.userAgent = "";
this.cookieString = "";
this.fetchImage = fetch_1.fetchFile;
this.filters = {
sortby: {
-1
View File
@@ -53,7 +53,6 @@ var TL = /** @class */ (function () {
this.version = "1.0.0";
this.icon = "src/ru/noveltl/icon.png";
this.userAgent = "";
this.cookieString = "";
this.fetchImage = fetch_1.fetchFile;
this.filters = {
tags: {
-1
View File
@@ -52,7 +52,6 @@ var RNBH = /** @class */ (function () {
this.site = "https://ranobehub.org/";
this.icon = "src/ru/ranobehub/icon.png";
this.userAgent = "";
this.cookieString = "";
this.fetchImage = fetch_1.fetchFile;
this.filters = {
sort: {
-1
View File
@@ -53,7 +53,6 @@ var RLIB = /** @class */ (function () {
this.icon = "src/ru/ranobelib/icon.png";
this.ui = undefined;
this.userAgent = "";
this.cookieString = "";
this.fetchImage = fetch_1.fetchFile;
this.filters = {
sort: {
-1
View File
@@ -53,7 +53,6 @@ var RNRF = /** @class */ (function () {
this.version = "1.0.0";
this.icon = "src/ru/ranoberf/icon.png";
this.userAgent = "";
this.cookieString = "";
this.fetchImage = fetch_1.fetchFile;
this.filters = {
sort: {
-1
View File
@@ -51,7 +51,6 @@ var ReN = /** @class */ (function () {
this.version = "1.0.0";
this.icon = "src/ru/renovels/icon.png";
this.userAgent = "";
this.cookieString = "";
this.fetchImage = fetch_1.fetchFile;
this.filters = {
sort: {
@@ -49,7 +49,6 @@ var IfreedomPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.filters = metadata.filters;
}
IfreedomPlugin.prototype.popularNovels = function (page, _a) {
-10
View File
@@ -50,7 +50,6 @@ var TuNovelaLigera = /** @class */ (function () {
this.site = "https://tunovelaligera.com/";
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.filters = {
order: {
value: "?m_orderby=rating",
@@ -137,9 +136,6 @@ var TuNovelaLigera = /** @class */ (function () {
link += "/page/".concat(pageNo);
link += filters.order;
headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(link, { headers: headers })];
case 1:
result = _b.sent();
@@ -175,9 +171,6 @@ var TuNovelaLigera = /** @class */ (function () {
case 0:
url = novelUrl;
headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })];
case 1:
result = _c.sent();
@@ -353,9 +346,6 @@ var TuNovelaLigera = /** @class */ (function () {
switch (_a.label) {
case 0:
headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(chapterUrl)];
case 1:
result = _a.sent();
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite;
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.options = metadata.options;
this.filters = metadata.filters;
}
-13
View File
@@ -47,7 +47,6 @@ var LSHNovel = /** @class */ (function () {
this.site = "https://lshnovel.com/";
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
this.filters = {
order: {
value: "popular",
@@ -144,9 +143,6 @@ var LSHNovel = /** @class */ (function () {
link += "&status=" + filters.status;
link += "&order=" + filters.order;
headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(link, { headers: headers }).then(function (result) {
return result.text();
})];
@@ -181,9 +177,6 @@ var LSHNovel = /** @class */ (function () {
case 0:
url = novelUrl;
headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })];
case 1:
result = _a.sent();
@@ -259,9 +252,6 @@ var LSHNovel = /** @class */ (function () {
switch (_a.label) {
case 0:
headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(chapterUrl, { headers: headers })];
case 1:
result = _a.sent();
@@ -283,9 +273,6 @@ var LSHNovel = /** @class */ (function () {
case 0:
url = "".concat(this.site, "?s=").concat(searchTerm);
headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })];
case 1:
result = _a.sent();
-1
View File
@@ -50,7 +50,6 @@ var Smakolykytl = /** @class */ (function () {
this.version = "1.0.0";
this.icon = "src/ua/smakolykytl/icon.png";
this.userAgent = "";
this.cookieString = "";
this.fetchImage = fetch_1.fetchFile;
}
Smakolykytl.prototype.popularNovels = function (pageNo, _a) {
-1
View File
@@ -47,7 +47,6 @@ var HakoPlugin = /** @class */ (function () {
this.site = "https://ln.hako.vn";
this.version = "1.0.0";
this.userAgent = "";
this.cookieString = "";
}
HakoPlugin.prototype.parseNovels = function (loadedCheerio) {
var _this = this;
-4
View File
@@ -40,10 +40,6 @@ npm install
```
npm start
```
or
```
nodemon
```
+ Then open http://localhost:3000
+29
View File
@@ -6,6 +6,19 @@ import express from "express";
import bodyParser from "body-parser";
import * as pluginApi from "./test_web/api/plugins";
import localizedFormat from "dayjs/plugin/localizedFormat";
interface GlobalState {
UserAgent?: string,
Cookie?: string,
}
let globalState: GlobalState = {
}
export const getHeaders = () => {
return {
'User-Agent': globalState.UserAgent,
'Cookie': globalState.Cookie,
};
};
const app = express();
const port = 3000;
@@ -13,6 +26,14 @@ const host = "localhost";
const dirname = path.join(__dirname, "..");
app.use((req, res, next) => {
globalState.UserAgent = req.headers["user-agent"];
console.log('---------');
console.log('default headers: ', globalState);
console.log('---------');
console.log();
next();
});
app.use(bodyParser.json());
app.use("/static", express.static(path.join(dirname, "test_web", "static")));
app.use("/icons", express.static(path.join(dirname, "icons")));
@@ -20,6 +41,14 @@ app.get("/all_plugins", (req, res) => {
const allPlugins = pluginApi.all_plugins();
res.json(allPlugins);
});
app.post("/add_cookie", async (req, res) => {
globalState.Cookie = req.body['cookie'];
console.log('---------');
console.log('default headers: ', globalState);
console.log('---------');
console.log();
res.json({});
});
app.post("/filters", async (req, res) => {
const filters = await pluginApi.getFilter(req.body['pluginRequirePath']);
res.json(filters || []);
+38 -10
View File
@@ -1,16 +1,44 @@
const defaultUserAgentString =
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36";
export async function fetchApi(
url: string,
init?: RequestInit,
init?: {
headers?: Record<string,string> | Headers;
[x: string]: string | Record<string,string> | undefined | FormData | Headers;
},
) {
const headers = {
"User-Agent": defaultUserAgentString,
...init?.headers,
};
console.log(url, { ...init, headers })
return await fetch(url, { ...init, headers });
let defaultHeaders: {
'User-Agent'?: string,
'Cookie'?: string,
} = {};
try {
const getHeaders = (await import('../index.js')).getHeaders;
defaultHeaders = getHeaders();
}catch{
// nothing to do
}
if(init?.headers) {
if(init.headers instanceof Headers){
if(!init.headers.get('User-Agent') && defaultHeaders['User-Agent']){
init.headers.set('User-Agent', defaultHeaders['User-Agent']);
}
if(defaultHeaders.Cookie) {
init.headers.set('Cookie', defaultHeaders.Cookie);
}
}else{
init.headers = {
...defaultHeaders,
...init.headers,
};
}
}else{
init = {
...init,
headers: defaultHeaders
}
}
console.log(url, init);
return await fetch(url, init);
}
export const fetchFile = async function (url: string, init?: RequestInit) {
-5
View File
@@ -1,5 +0,0 @@
{
"ext": "js,mjs,json,ts",
"ignore": [".js/**"],
"exec": "tsc && node ./.js/index.js"
}
+313 -217
View File
@@ -26,8 +26,8 @@
"@types/express": "^4.17.17",
"@types/jquery": "^3.5.28",
"@types/node": "^20.3.1",
"nodemon": "^2.0.22",
"pre-commit": "^1.2.2"
"pre-commit": "^1.2.2",
"tsc-watch": "^6.0.4"
}
},
"node_modules/@cspotcode/source-map-support": {
@@ -216,12 +216,6 @@
"integrity": "sha512-sU5MNKvSFdbT97qLSabU6jxceY9BfYQe9uF+b8E1rdTecpq9ROkkKoiHlblUlhgfaz9bdCByWjAI40Y3mHf1iQ==",
"dev": true
},
"node_modules/abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
"dev": true
},
"node_modules/accepts": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
@@ -994,7 +988,7 @@
"version": "3.2.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
"devOptional": true,
"optional": true,
"dependencies": {
"ms": "^2.1.1"
}
@@ -1194,6 +1188,12 @@
"url": "https://github.com/fb55/domutils?sponsor=1"
}
},
"node_modules/duplexer": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz",
"integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==",
"dev": true
},
"node_modules/duplexer2": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz",
@@ -1334,6 +1334,21 @@
"es5-ext": "~0.10.14"
}
},
"node_modules/event-stream": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz",
"integrity": "sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g==",
"dev": true,
"dependencies": {
"duplexer": "~0.1.1",
"from": "~0",
"map-stream": "~0.1.0",
"pause-stream": "0.0.11",
"split": "0.3",
"stream-combiner": "~0.0.4",
"through": "~2.3.1"
}
},
"node_modules/events": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
@@ -1548,6 +1563,12 @@
"node": ">= 0.6"
}
},
"node_modules/from": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz",
"integrity": "sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==",
"dev": true
},
"node_modules/fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
@@ -1670,15 +1691,6 @@
"node": ">= 0.4.0"
}
},
"node_modules/has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
"dev": true,
"engines": {
"node": ">=4"
}
},
"node_modules/has-property-descriptors": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz",
@@ -1866,12 +1878,6 @@
"node": ">= 4"
}
},
"node_modules/ignore-by-default": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
"integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==",
"dev": true
},
"node_modules/image-size": {
"version": "0.5.5",
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz",
@@ -2178,6 +2184,12 @@
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw=="
},
"node_modules/map-stream": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz",
"integrity": "sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==",
"dev": true
},
"node_modules/md5.js": {
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
@@ -2434,48 +2446,11 @@
"resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz",
"integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ=="
},
"node_modules/nodemon": {
"version": "2.0.22",
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz",
"integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==",
"dev": true,
"dependencies": {
"chokidar": "^3.5.2",
"debug": "^3.2.7",
"ignore-by-default": "^1.0.1",
"minimatch": "^3.1.2",
"pstree.remy": "^1.1.8",
"semver": "^5.7.1",
"simple-update-notifier": "^1.0.7",
"supports-color": "^5.5.0",
"touch": "^3.1.0",
"undefsafe": "^2.0.5"
},
"bin": {
"nodemon": "bin/nodemon.js"
},
"engines": {
"node": ">=8.10.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/nodemon"
}
},
"node_modules/nopt": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
"integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==",
"dev": true,
"dependencies": {
"abbrev": "1"
},
"bin": {
"nopt": "bin/nopt.js"
},
"engines": {
"node": "*"
}
"node_modules/node-cleanup": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/node-cleanup/-/node-cleanup-2.1.2.tgz",
"integrity": "sha512-qN8v/s2PAJwGUtr1/hYTpNKlD6Y9rc4p8KSmJXyGdYGZsDGKXrGThikLFP9OCHFeLeEpQzPwiAtdIvBLqm//Hw==",
"dev": true
},
"node_modules/normalize-path": {
"version": "3.0.0",
@@ -2644,6 +2619,15 @@
"node": ">=0.10.0"
}
},
"node_modules/path-key": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
"dev": true,
"engines": {
"node": ">=8"
}
},
"node_modules/path-parse": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
@@ -2670,6 +2654,15 @@
"node": ">=8"
}
},
"node_modules/pause-stream": {
"version": "0.0.11",
"resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz",
"integrity": "sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==",
"dev": true,
"dependencies": {
"through": "~2.3"
}
},
"node_modules/pbkdf2": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz",
@@ -2788,18 +2781,27 @@
"integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==",
"optional": true
},
"node_modules/ps-tree": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.2.0.tgz",
"integrity": "sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA==",
"dev": true,
"dependencies": {
"event-stream": "=3.3.4"
},
"bin": {
"ps-tree": "bin/ps-tree.js"
},
"engines": {
"node": ">= 0.10"
}
},
"node_modules/pseudomap": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
"integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==",
"dev": true
},
"node_modules/pstree.remy": {
"version": "1.1.8",
"resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
"integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==",
"dev": true
},
"node_modules/public-encrypt": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz",
@@ -3049,7 +3051,7 @@
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"devOptional": true,
"optional": true,
"bin": {
"semver": "bin/semver"
}
@@ -3204,27 +3206,6 @@
}
]
},
"node_modules/simple-update-notifier": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz",
"integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==",
"dev": true,
"dependencies": {
"semver": "~7.0.0"
},
"engines": {
"node": ">=8.10.0"
}
},
"node_modules/simple-update-notifier/node_modules/semver": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz",
"integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==",
"dev": true,
"bin": {
"semver": "bin/semver.js"
}
},
"node_modules/slash": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
@@ -3260,6 +3241,18 @@
"os-shim": "^0.1.2"
}
},
"node_modules/split": {
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz",
"integrity": "sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA==",
"dev": true,
"dependencies": {
"through": "2"
},
"engines": {
"node": "*"
}
},
"node_modules/statuses": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
@@ -3290,6 +3283,15 @@
"node": ">= 6"
}
},
"node_modules/stream-combiner": {
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz",
"integrity": "sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw==",
"dev": true,
"dependencies": {
"duplexer": "~0.1.1"
}
},
"node_modules/stream-combiner2": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz",
@@ -3345,6 +3347,15 @@
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"node_modules/string-argv": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz",
"integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==",
"dev": true,
"engines": {
"node": ">=0.6.19"
}
},
"node_modules/subarg": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz",
@@ -3353,18 +3364,6 @@
"minimist": "^1.1.0"
}
},
"node_modules/supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"dependencies": {
"has-flag": "^3.0.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/supports-preserve-symlinks-flag": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
@@ -3437,18 +3436,6 @@
"node": ">=0.6"
}
},
"node_modules/touch": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
"integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==",
"dev": true,
"dependencies": {
"nopt": "~1.0.10"
},
"bin": {
"nodetouch": "bin/nodetouch.js"
}
},
"node_modules/ts-node": {
"version": "10.9.1",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
@@ -3507,6 +3494,77 @@
"tsc-alias": "dist/bin/index.js"
}
},
"node_modules/tsc-watch": {
"version": "6.0.4",
"resolved": "https://registry.npmjs.org/tsc-watch/-/tsc-watch-6.0.4.tgz",
"integrity": "sha512-cHvbvhjO86w2aGlaHgSCeQRl+Aqw6X6XN4sQMPZKF88GoP30O+oTuh5lRIJr5pgFWrRpF1AgXnJJ2DoFEIPHyg==",
"dev": true,
"dependencies": {
"cross-spawn": "^7.0.3",
"node-cleanup": "^2.1.2",
"ps-tree": "^1.2.0",
"string-argv": "^0.3.1"
},
"bin": {
"tsc-watch": "dist/lib/tsc-watch.js"
},
"engines": {
"node": ">=12.12.0"
},
"peerDependencies": {
"typescript": "*"
}
},
"node_modules/tsc-watch/node_modules/cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
"dev": true,
"dependencies": {
"path-key": "^3.1.0",
"shebang-command": "^2.0.0",
"which": "^2.0.1"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/tsc-watch/node_modules/shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
"dev": true,
"dependencies": {
"shebang-regex": "^3.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/tsc-watch/node_modules/shebang-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
"dev": true,
"engines": {
"node": ">=8"
}
},
"node_modules/tsc-watch/node_modules/which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
"dev": true,
"dependencies": {
"isexe": "^2.0.0"
},
"bin": {
"node-which": "bin/node-which"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/tslib": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
@@ -3574,12 +3632,6 @@
"undeclared-identifiers": "bin.js"
}
},
"node_modules/undefsafe": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
"integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==",
"dev": true
},
"node_modules/unpipe": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
@@ -3884,12 +3936,6 @@
"integrity": "sha512-sU5MNKvSFdbT97qLSabU6jxceY9BfYQe9uF+b8E1rdTecpq9ROkkKoiHlblUlhgfaz9bdCByWjAI40Y3mHf1iQ==",
"dev": true
},
"abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
"dev": true
},
"accepts": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
@@ -4543,7 +4589,7 @@
"version": "3.2.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
"devOptional": true,
"optional": true,
"requires": {
"ms": "^2.1.1"
}
@@ -4686,6 +4732,12 @@
"domhandler": "^5.0.3"
}
},
"duplexer": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz",
"integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==",
"dev": true
},
"duplexer2": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz",
@@ -4803,6 +4855,21 @@
"es5-ext": "~0.10.14"
}
},
"event-stream": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz",
"integrity": "sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g==",
"dev": true,
"requires": {
"duplexer": "~0.1.1",
"from": "~0",
"map-stream": "~0.1.0",
"pause-stream": "0.0.11",
"split": "0.3",
"stream-combiner": "~0.0.4",
"through": "~2.3.1"
}
},
"events": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
@@ -4995,6 +5062,12 @@
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
"integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q=="
},
"from": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz",
"integrity": "sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==",
"dev": true
},
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
@@ -5083,12 +5156,6 @@
"function-bind": "^1.1.1"
}
},
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
"dev": true
},
"has-property-descriptors": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz",
@@ -5215,12 +5282,6 @@
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
"integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ=="
},
"ignore-by-default": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
"integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==",
"dev": true
},
"image-size": {
"version": "0.5.5",
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz",
@@ -5452,6 +5513,12 @@
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw=="
},
"map-stream": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz",
"integrity": "sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==",
"dev": true
},
"md5.js": {
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
@@ -5642,32 +5709,11 @@
"resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz",
"integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ=="
},
"nodemon": {
"version": "2.0.22",
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz",
"integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==",
"dev": true,
"requires": {
"chokidar": "^3.5.2",
"debug": "^3.2.7",
"ignore-by-default": "^1.0.1",
"minimatch": "^3.1.2",
"pstree.remy": "^1.1.8",
"semver": "^5.7.1",
"simple-update-notifier": "^1.0.7",
"supports-color": "^5.5.0",
"touch": "^3.1.0",
"undefsafe": "^2.0.5"
}
},
"nopt": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
"integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==",
"dev": true,
"requires": {
"abbrev": "1"
}
"node-cleanup": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/node-cleanup/-/node-cleanup-2.1.2.tgz",
"integrity": "sha512-qN8v/s2PAJwGUtr1/hYTpNKlD6Y9rc4p8KSmJXyGdYGZsDGKXrGThikLFP9OCHFeLeEpQzPwiAtdIvBLqm//Hw==",
"dev": true
},
"normalize-path": {
"version": "3.0.0",
@@ -5797,6 +5843,12 @@
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg=="
},
"path-key": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
"dev": true
},
"path-parse": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
@@ -5817,6 +5869,15 @@
"resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
"integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw=="
},
"pause-stream": {
"version": "0.0.11",
"resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz",
"integrity": "sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==",
"dev": true,
"requires": {
"through": "~2.3"
}
},
"pbkdf2": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz",
@@ -5899,18 +5960,21 @@
"integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==",
"optional": true
},
"ps-tree": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.2.0.tgz",
"integrity": "sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA==",
"dev": true,
"requires": {
"event-stream": "=3.3.4"
}
},
"pseudomap": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
"integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==",
"dev": true
},
"pstree.remy": {
"version": "1.1.8",
"resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
"integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==",
"dev": true
},
"public-encrypt": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz",
@@ -6094,7 +6158,7 @@
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"devOptional": true
"optional": true
},
"send": {
"version": "0.18.0",
@@ -6212,23 +6276,6 @@
"resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",
"integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q=="
},
"simple-update-notifier": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz",
"integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==",
"dev": true,
"requires": {
"semver": "~7.0.0"
},
"dependencies": {
"semver": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz",
"integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==",
"dev": true
}
}
},
"slash": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
@@ -6254,6 +6301,15 @@
"os-shim": "^0.1.2"
}
},
"split": {
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz",
"integrity": "sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA==",
"dev": true,
"requires": {
"through": "2"
}
},
"statuses": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
@@ -6280,6 +6336,15 @@
}
}
},
"stream-combiner": {
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz",
"integrity": "sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw==",
"dev": true,
"requires": {
"duplexer": "~0.1.1"
}
},
"stream-combiner2": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz",
@@ -6336,6 +6401,12 @@
}
}
},
"string-argv": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz",
"integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==",
"dev": true
},
"subarg": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz",
@@ -6344,15 +6415,6 @@
"minimist": "^1.1.0"
}
},
"supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
},
"supports-preserve-symlinks-flag": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
@@ -6410,15 +6472,6 @@
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="
},
"touch": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
"integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==",
"dev": true,
"requires": {
"nopt": "~1.0.10"
}
},
"ts-node": {
"version": "10.9.1",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
@@ -6452,6 +6505,55 @@
"plimit-lit": "^1.2.6"
}
},
"tsc-watch": {
"version": "6.0.4",
"resolved": "https://registry.npmjs.org/tsc-watch/-/tsc-watch-6.0.4.tgz",
"integrity": "sha512-cHvbvhjO86w2aGlaHgSCeQRl+Aqw6X6XN4sQMPZKF88GoP30O+oTuh5lRIJr5pgFWrRpF1AgXnJJ2DoFEIPHyg==",
"dev": true,
"requires": {
"cross-spawn": "^7.0.3",
"node-cleanup": "^2.1.2",
"ps-tree": "^1.2.0",
"string-argv": "^0.3.1"
},
"dependencies": {
"cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
"dev": true,
"requires": {
"path-key": "^3.1.0",
"shebang-command": "^2.0.0",
"which": "^2.0.1"
}
},
"shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
"dev": true,
"requires": {
"shebang-regex": "^3.0.0"
}
},
"shebang-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
"dev": true
},
"which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
"dev": true,
"requires": {
"isexe": "^2.0.0"
}
}
}
},
"tslib": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
@@ -6503,12 +6605,6 @@
"xtend": "^4.0.1"
}
},
"undefsafe": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
"integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==",
"dev": true
},
"unpipe": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
+6 -6
View File
@@ -1,17 +1,17 @@
{
"name": "lnreader-plugins",
"version": "1.0.0",
"description": "",
"description": "Plugins repo for LNReader",
"main": "index.js",
"scripts": {
"start": "nodemon",
"start": "tsc-watch --onSuccess \"node ./.js/index.js\"",
"test": "exit 0",
"json": "tsc && node ./.js/scripts/json_plugins.js && git add plugins && git add .dist && git add .js/plugins",
"json": "tsc && rm ./.js/index.js && node ./.js/scripts/json_plugins.js && git add plugins && git add .dist && git add .js/plugins",
"generate": "ts-node ./scripts/multisrc/generate.ts && tsc",
"clearMulti": "ts-node ./scripts/clearMultisrc.ts",
"less": "npx less ./test_web/static/css/index.less ./test_web/static/css/index.css"
},
"author": "",
"author": "LNReader",
"license": "MIT",
"dependencies": {
"body-parser": "^1.20.2",
@@ -38,8 +38,8 @@
"@types/express": "^4.17.17",
"@types/jquery": "^3.5.28",
"@types/node": "^20.3.1",
"nodemon": "^2.0.22",
"pre-commit": "^1.2.2"
"pre-commit": "^1.2.2",
"tsc-watch": "^6.0.4"
},
"pre-commit": [
"json"
+315 -328
View File
@@ -1,328 +1,315 @@
import { load as parseHTML } from "cheerio";
import { fetchApi, fetchFile } from "@libs/fetch";
import { FilterTypes, Filters } from "@libs/filterInputs";
import { Plugin } from "@typings/plugin";
class KolNovel implements Plugin.PluginBase {
id = "kolnovel";
name = "KolNovel";
icon = "multisrc/wpmangastream/icons/kolnovel.png";
site = "https://kolnovel.lol/";
version = "1.0.0";
userAgent = "";
cookieString = "";
async popularNovels(
pageNo: number,
{ filters }: Plugin.PopularNovelsOptions<typeof this.filters>
): Promise<Plugin.NovelItem[]> {
let link = `${this.site}series/?page=${pageNo}`;
if (filters.genres.value.length)
link += filters.genres.value.map((i) => `&genre[]=${i}`).join("");
if (filters.type.value.length)
link += filters.type.value.map((i) => `&lang[]=${i}`).join("");
link += "&status=" + (filters?.status ? filters.status : "");
link += "&order=" + (filters?.order ? filters.order : "popular");
const headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
const body = await fetchApi(link, { headers }).then((result) =>
result.text()
);
const loadedCheerio = parseHTML(body);
const 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 headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
const result = await fetch(url, { headers });
const body = await result.text();
let loadedCheerio = parseHTML(body);
const novel: Plugin.SourceNovel = {
url,
chapters: [],
};
novel.name = loadedCheerio("h1.entry-title").text();
novel.cover =
loadedCheerio("img.wp-post-image").attr("data-src") ||
loadedCheerio("img.wp-post-image").attr("src");
loadedCheerio("div.serl:nth-child(3) > span").each(function () {
const detailName = loadedCheerio(this).text().trim();
const detail = loadedCheerio(this).next().text().trim();
switch (detailName) {
case "الكاتب":
case "Author":
novel.author = detail;
break;
}
});
novel.status = loadedCheerio("div.sertostat > span").attr("class");
novel.genres = loadedCheerio(".sertogenre")
.children("a")
.map((i, el) => loadedCheerio(el).text())
.toArray()
.join(",");
novel.summary = loadedCheerio(".sersys")
.find("br")
.replaceWith("\n")
.end()
.text();
let chapter: 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;
chapter.push({
name: chapterName,
releaseTime: releaseDate,
url: chapterUrl,
});
});
novel.chapters = chapter.reverse();
return novel;
}
async parseChapter(chapterUrl: string): Promise<string> {
const headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
const result = await fetch(chapterUrl, { headers });
const body = await result.text();
const loadedCheerio = parseHTML(body);
loadedCheerio(".epcontent > div, i").remove();
let ignore = loadedCheerio("article > style").text().trim().split(",");
ignore.push(...(ignore.pop()?.match(/^\.\w+/) || []));
ignore.map((tag) => loadedCheerio(`p${tag}`).remove());
let chapterText = loadedCheerio(".epcontent").html() || "";
return chapterText;
}
async searchNovels(
searchTerm: string,
pageNo?: number | undefined
): Promise<Plugin.NovelItem[]> {
const url = `${this.site}?s=${searchTerm}`;
const headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
const result = await fetchApi(url, { headers });
const body = await result.text();
const loadedCheerio = parseHTML(body);
const 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;
novels.push({
name: novelName,
url: novelUrl,
cover: novelCover,
});
});
return novels;
}
async fetchImage(url: string): Promise<string | undefined> {
return await fetchFile(url);
}
filters = {
order: {
label: "ترتيب حسب",
options: [
{ label: "الإعداد الأولي", value: "" },
{ label: "A-Z", value: "title" },
{ label: "Z-A", value: "titlereverse" },
{ label: "أخر التحديثات", value: "update" },
{ label: "أخر ما تم إضافته", value: "latest" },
{ label: "الرائجة", value: "popular" },
],
value: "",
type: FilterTypes.Picker,
},
status: {
value: "",
label: "الحالة",
options: [
{ label: "All", value: "" },
{ label: "Ongoing", value: "ongoing" },
{ label: "Hiatus", value: "hiatus" },
{ label: "Completed", value: "completed" },
],
type: FilterTypes.Picker,
},
type: {
value: [],
label: "النوع",
options: [
{ label: "إنجليزية", value: "english" },
{ label: "روايةلايت", value: "light-novel" },
{ label: "روايةويب", value: "web-novel" },
{ label: "صينية", value: "chinese" },
{ label: "عربية", value: "arabic" },
{ label: "كورية", value: "korean" },
{ label: "يابانية", value: "japanese" },
],
type: FilterTypes.CheckboxGroup,
},
genres: {
value: [],
label: "تصنيف",
options: [
{ label: "Wuxia", value: "wuxia" },
{ label: "Xianxia", value: "xianxia" },
{ label: "XUANHUAN", value: "xuanhuan" },
{ label: "أكشن", value: "action" },
{ label: "إثارة", value: "excitement" },
{ label: "إنتقالالىعالمأخر", value: "isekai" },
{ label: "إيتشي", value: "etchi" },
{ label: "الخيالالعلمي", value: "sci-fi" },
{ label: "بوليسي", value: "policy" },
{ label: "تاريخي", value: "historical" },
{ label: "تحقيقات", value: "%d8%aa%d8%ad%d9%82%d9%8a%d9%82" },
{ label: "تقمصشخصيات", value: "rpg" },
{ label: "جريمة", value: "crime" },
{ label: "جوسى", value: "josei" },
{ label: "حريم", value: "harem" },
{ label: "حياةمدرسية", value: "school-life" },
{ label: "خيالي(فانتازيا)", value: "fantasy" },
{ label: "دراما", value: "drama" },
{ label: "رعب", value: "horror" },
{ label: "رومانسي", value: "romantic" },
{ label: "سحر", value: "magic" },
{ label: "سينن", value: "senen" },
{ label: "شريحةمنالحياة", value: "slice-of-life" },
{ label: "شوجو", value: "shojo" },
{ label: "شونين", value: "shonen" },
{ label: "طبي", value: "medical" },
{ label: "ظواهرخارقةللطبيعة", value: "supernatural" },
{ label: "غموض", value: "mysteries" },
{ label: "فنونالقتال", value: "martial-arts" },
{ label: "قوىخارقة", value: "superpower" },
{ label: "كوميدي", value: "comedy" },
{ label: "مأساوي", value: "tragedy" },
{ label: "مابعدالكارثة", value: "after-the-disaster" },
{ label: "مغامرة", value: "adventure" },
{ label: "ميكا", value: "mechanical" },
{ label: "ناضج", value: "mature" },
{ label: "نفسي", value: "psychological" },
],
type: FilterTypes.CheckboxGroup,
},
} satisfies Filters;
}
export default new KolNovel();
import { load as parseHTML } from "cheerio";
import { fetchApi, fetchFile } from "@libs/fetch";
import { FilterTypes, Filters } from "@libs/filterInputs";
import { Plugin } from "@typings/plugin";
class KolNovel implements Plugin.PluginBase {
id = "kolnovel";
name = "KolNovel";
icon = "multisrc/wpmangastream/icons/kolnovel.png";
site = "https://kolnovel.lol/";
version = "1.0.0";
userAgent = "";
async popularNovels(
pageNo: number,
{ filters }: Plugin.PopularNovelsOptions<typeof this.filters>
): Promise<Plugin.NovelItem[]> {
let link = `${this.site}series/?page=${pageNo}`;
if (filters.genres.value.length)
link += filters.genres.value.map((i) => `&genre[]=${i}`).join("");
if (filters.type.value.length)
link += filters.type.value.map((i) => `&lang[]=${i}`).join("");
link += "&status=" + (filters?.status ? filters.status : "");
link += "&order=" + (filters?.order ? filters.order : "popular");
const headers = new Headers();
const body = await fetchApi(link, { headers }).then((result) =>
result.text()
);
const loadedCheerio = parseHTML(body);
const 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 headers = new Headers();
const result = await fetch(url, { headers });
const body = await result.text();
let loadedCheerio = parseHTML(body);
const novel: Plugin.SourceNovel = {
url,
chapters: [],
};
novel.name = loadedCheerio("h1.entry-title").text();
novel.cover =
loadedCheerio("img.wp-post-image").attr("data-src") ||
loadedCheerio("img.wp-post-image").attr("src");
loadedCheerio("div.serl:nth-child(3) > span").each(function () {
const detailName = loadedCheerio(this).text().trim();
const detail = loadedCheerio(this).next().text().trim();
switch (detailName) {
case "الكاتب":
case "Author":
novel.author = detail;
break;
}
});
novel.status = loadedCheerio("div.sertostat > span").attr("class");
novel.genres = loadedCheerio(".sertogenre")
.children("a")
.map((i, el) => loadedCheerio(el).text())
.toArray()
.join(",");
novel.summary = loadedCheerio(".sersys")
.find("br")
.replaceWith("\n")
.end()
.text();
let chapter: 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;
chapter.push({
name: chapterName,
releaseTime: releaseDate,
url: chapterUrl,
});
});
novel.chapters = chapter.reverse();
return novel;
}
async parseChapter(chapterUrl: string): Promise<string> {
const headers = new Headers();
const result = await fetch(chapterUrl, { headers });
const body = await result.text();
const loadedCheerio = parseHTML(body);
loadedCheerio(".epcontent > div, i").remove();
let ignore = loadedCheerio("article > style").text().trim().split(",");
ignore.push(...(ignore.pop()?.match(/^\.\w+/) || []));
ignore.map((tag) => loadedCheerio(`p${tag}`).remove());
let chapterText = loadedCheerio(".epcontent").html() || "";
return chapterText;
}
async searchNovels(
searchTerm: string,
pageNo?: number | undefined
): Promise<Plugin.NovelItem[]> {
const url = `${this.site}?s=${searchTerm}`;
const headers = new Headers();
const result = await fetchApi(url, { headers });
const body = await result.text();
const loadedCheerio = parseHTML(body);
const 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;
novels.push({
name: novelName,
url: novelUrl,
cover: novelCover,
});
});
return novels;
}
async fetchImage(url: string): Promise<string | undefined> {
return await fetchFile(url);
}
filters = {
order: {
label: "ترتيب حسب",
options: [
{ label: "الإعداد الأولي", value: "" },
{ label: "A-Z", value: "title" },
{ label: "Z-A", value: "titlereverse" },
{ label: "أخر التحديثات", value: "update" },
{ label: "أخر ما تم إضافته", value: "latest" },
{ label: "الرائجة", value: "popular" },
],
value: "",
type: FilterTypes.Picker,
},
status: {
value: "",
label: "الحالة",
options: [
{ label: "All", value: "" },
{ label: "Ongoing", value: "ongoing" },
{ label: "Hiatus", value: "hiatus" },
{ label: "Completed", value: "completed" },
],
type: FilterTypes.Picker,
},
type: {
value: [],
label: "النوع",
options: [
{ label: "إنجليزية", value: "english" },
{ label: "روايةلايت", value: "light-novel" },
{ label: "روايةويب", value: "web-novel" },
{ label: "صينية", value: "chinese" },
{ label: "عربية", value: "arabic" },
{ label: "كورية", value: "korean" },
{ label: "يابانية", value: "japanese" },
],
type: FilterTypes.CheckboxGroup,
},
genres: {
value: [],
label: "تصنيف",
options: [
{ label: "Wuxia", value: "wuxia" },
{ label: "Xianxia", value: "xianxia" },
{ label: "XUANHUAN", value: "xuanhuan" },
{ label: "أكشن", value: "action" },
{ label: "إثارة", value: "excitement" },
{ label: "إنتقالالىعالمأخر", value: "isekai" },
{ label: "إيتشي", value: "etchi" },
{ label: "الخيالالعلمي", value: "sci-fi" },
{ label: "بوليسي", value: "policy" },
{ label: "تاريخي", value: "historical" },
{ label: "تحقيقات", value: "%d8%aa%d8%ad%d9%82%d9%8a%d9%82" },
{ label: "تقمصشخصيات", value: "rpg" },
{ label: "جريمة", value: "crime" },
{ label: "جوسى", value: "josei" },
{ label: "حريم", value: "harem" },
{ label: "حياةمدرسية", value: "school-life" },
{ label: "خيالي(فانتازيا)", value: "fantasy" },
{ label: "دراما", value: "drama" },
{ label: "رعب", value: "horror" },
{ label: "رومانسي", value: "romantic" },
{ label: "سحر", value: "magic" },
{ label: "سينن", value: "senen" },
{ label: "شريحةمنالحياة", value: "slice-of-life" },
{ label: "شوجو", value: "shojo" },
{ label: "شونين", value: "shonen" },
{ label: "طبي", value: "medical" },
{ label: "ظواهرخارقةللطبيعة", value: "supernatural" },
{ label: "غموض", value: "mysteries" },
{ label: "فنونالقتال", value: "martial-arts" },
{ label: "قوىخارقة", value: "superpower" },
{ label: "كوميدي", value: "comedy" },
{ label: "مأساوي", value: "tragedy" },
{ label: "مابعدالكارثة", value: "after-the-disaster" },
{ label: "مغامرة", value: "adventure" },
{ label: "ميكا", value: "mechanical" },
{ label: "ناضج", value: "mature" },
{ label: "نفسي", value: "psychological" },
],
type: FilterTypes.CheckboxGroup,
},
} satisfies Filters;
}
export default new KolNovel();
File diff suppressed because it is too large Load Diff
+180 -181
View File
@@ -1,181 +1,180 @@
import { load as cheerioload } from "cheerio";
import { Plugin } from "@typings/plugin";
import { defaultCover } from "@libs/defaultCover";
import { fetchFile } from "@libs/fetch";
import { NovelStatus } from "@libs/novelStatus";
class BLN implements Plugin.PluginBase {
id = "BLN.com";
name = "BestLightNovel";
icon = "src/en/bestlightnovel/icon.png";
site = "https://bestlightnovel.com/";
filter?: undefined;
version = "1.0.0";
userAgent = "";
cookieString = "";
async popularNovels(
pageNo: number,
options: Plugin.PopularNovelsOptions
): Promise<Plugin.NovelItem[]> {
const url =
this.site +
"novel_list?type=topview&category=all&state=all&page=1" +
pageNo;
const result = await fetch(url);
if (!result.ok) {
console.error(await result.text());
// TODO: Cloudflare protection or other error
return [];
}
const body = await result.text();
const loadedCheerio = cheerioload(body);
let novels: Plugin.NovelItem[] = [];
loadedCheerio(".update_item.list_category").each(function () {
const novelName = loadedCheerio(this).find("h3 > a").text();
const novelCover = loadedCheerio(this).find("img").attr("src");
const novelUrl = loadedCheerio(this).find("h3 > a").attr("href");
if (!novelUrl) {
// TODO: Handle error
console.error("No novel url!");
return;
}
const novel = {
name: novelName,
url: novelUrl,
cover: novelCover,
};
novels.push(novel);
});
return novels;
}
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> {
const url = novelUrl;
const result = await fetch(url);
if (!result.ok) {
console.error(await result.text());
// TODO: Cloudflare protection
return { url, chapters: [] };
}
const body = await result.text();
let loadedCheerio = cheerioload(body);
let novel: Plugin.SourceNovel = {
url,
name: "",
cover: "",
author: "",
status: NovelStatus.Unknown,
genres: "",
summary: "",
chapters: [],
};
novel.name = loadedCheerio(".truyen_info_right h1").text().trim();
novel.cover =
loadedCheerio(".info_image img").attr("src") || defaultCover;
novel.summary = loadedCheerio("#noidungm").text()?.trim();
novel.author = loadedCheerio(
"#main_body > div.cotgiua > div.truyen_info_wrapper > div.truyen_info > div.entry-header > div.truyen_if_wrap > ul > li:nth-child(2) > a"
)
.text()
?.trim();
let status = loadedCheerio(
"#main_body > div.cotgiua > div.truyen_info_wrapper > div.truyen_info > div.entry-header > div.truyen_if_wrap > ul > li:nth-child(4) > a"
)
.text()
?.trim();
novel.status =
status === "ONGOING"
? NovelStatus.Ongoing
: status === "COMPLETED"
? NovelStatus.Completed
: NovelStatus.Unknown;
let novelChapters: Plugin.ChapterItem[] = [];
loadedCheerio(".chapter-list div.row").each(function () {
const chapterName = loadedCheerio(this).find("a").text().trim();
const releaseDate = loadedCheerio(this)
.find("span:nth-child(2)")
.text()
.trim();
const chapterUrl = loadedCheerio(this).find("a").attr("href");
if (!chapterUrl) {
// TODO: Handle error
console.error("No chapter url!");
return;
}
novelChapters.push({
name: chapterName,
releaseTime: releaseDate,
url: chapterUrl,
});
});
novel.chapters = novelChapters.reverse();
return novel;
}
async parseChapter(chapterUrl: string): Promise<string> {
const url = chapterUrl;
const result = await fetch(url);
const body = await result.text();
let loadedCheerio = cheerioload(body);
const chapterText = loadedCheerio("#vung_doc").html() || "";
return chapterText;
}
async searchNovels(
searchTerm: string,
pageNo?: number | undefined
): Promise<Plugin.NovelItem[]> {
const url = `${this.site}search_novels/${searchTerm}`;
const result = await fetch(url);
const body = await result.text();
let loadedCheerio = cheerioload(body);
let novels: Plugin.NovelItem[] = [];
loadedCheerio(".update_item.list_category").each(function () {
const novelName = loadedCheerio(this).find("h3 > a").text();
const novelCover = loadedCheerio(this).find("img").attr("src");
const novelUrl = loadedCheerio(this).find("h3 > a").attr("href");
if (!novelUrl) {
// TODO: Handle error
console.error("No novel url!");
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);
}
}
export default new BLN();
import { load as cheerioload } from "cheerio";
import { Plugin } from "@typings/plugin";
import { defaultCover } from "@libs/defaultCover";
import { fetchFile } from "@libs/fetch";
import { NovelStatus } from "@libs/novelStatus";
class BLN implements Plugin.PluginBase {
id = "BLN.com";
name = "BestLightNovel";
icon = "src/en/bestlightnovel/icon.png";
site = "https://bestlightnovel.com/";
filter?: undefined;
version = "1.0.0";
userAgent = "";
async popularNovels(
pageNo: number,
options: Plugin.PopularNovelsOptions
): Promise<Plugin.NovelItem[]> {
const url =
this.site +
"novel_list?type=topview&category=all&state=all&page=1" +
pageNo;
const result = await fetch(url);
if (!result.ok) {
console.error(await result.text());
// TODO: Cloudflare protection or other error
return [];
}
const body = await result.text();
const loadedCheerio = cheerioload(body);
let novels: Plugin.NovelItem[] = [];
loadedCheerio(".update_item.list_category").each(function () {
const novelName = loadedCheerio(this).find("h3 > a").text();
const novelCover = loadedCheerio(this).find("img").attr("src");
const novelUrl = loadedCheerio(this).find("h3 > a").attr("href");
if (!novelUrl) {
// TODO: Handle error
console.error("No novel url!");
return;
}
const novel = {
name: novelName,
url: novelUrl,
cover: novelCover,
};
novels.push(novel);
});
return novels;
}
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> {
const url = novelUrl;
const result = await fetch(url);
if (!result.ok) {
console.error(await result.text());
// TODO: Cloudflare protection
return { url, chapters: [] };
}
const body = await result.text();
let loadedCheerio = cheerioload(body);
let novel: Plugin.SourceNovel = {
url,
name: "",
cover: "",
author: "",
status: NovelStatus.Unknown,
genres: "",
summary: "",
chapters: [],
};
novel.name = loadedCheerio(".truyen_info_right h1").text().trim();
novel.cover =
loadedCheerio(".info_image img").attr("src") || defaultCover;
novel.summary = loadedCheerio("#noidungm").text()?.trim();
novel.author = loadedCheerio(
"#main_body > div.cotgiua > div.truyen_info_wrapper > div.truyen_info > div.entry-header > div.truyen_if_wrap > ul > li:nth-child(2) > a"
)
.text()
?.trim();
let status = loadedCheerio(
"#main_body > div.cotgiua > div.truyen_info_wrapper > div.truyen_info > div.entry-header > div.truyen_if_wrap > ul > li:nth-child(4) > a"
)
.text()
?.trim();
novel.status =
status === "ONGOING"
? NovelStatus.Ongoing
: status === "COMPLETED"
? NovelStatus.Completed
: NovelStatus.Unknown;
let novelChapters: Plugin.ChapterItem[] = [];
loadedCheerio(".chapter-list div.row").each(function () {
const chapterName = loadedCheerio(this).find("a").text().trim();
const releaseDate = loadedCheerio(this)
.find("span:nth-child(2)")
.text()
.trim();
const chapterUrl = loadedCheerio(this).find("a").attr("href");
if (!chapterUrl) {
// TODO: Handle error
console.error("No chapter url!");
return;
}
novelChapters.push({
name: chapterName,
releaseTime: releaseDate,
url: chapterUrl,
});
});
novel.chapters = novelChapters.reverse();
return novel;
}
async parseChapter(chapterUrl: string): Promise<string> {
const url = chapterUrl;
const result = await fetch(url);
const body = await result.text();
let loadedCheerio = cheerioload(body);
const chapterText = loadedCheerio("#vung_doc").html() || "";
return chapterText;
}
async searchNovels(
searchTerm: string,
pageNo?: number | undefined
): Promise<Plugin.NovelItem[]> {
const url = `${this.site}search_novels/${searchTerm}`;
const result = await fetch(url);
const body = await result.text();
let loadedCheerio = cheerioload(body);
let novels: Plugin.NovelItem[] = [];
loadedCheerio(".update_item.list_category").each(function () {
const novelName = loadedCheerio(this).find("h3 > a").text();
const novelCover = loadedCheerio(this).find("img").attr("src");
const novelUrl = loadedCheerio(this).find("h3 > a").attr("href");
if (!novelUrl) {
// TODO: Handle error
console.error("No novel url!");
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);
}
}
export default new BLN();
+1 -2
View File
@@ -9,8 +9,7 @@ class FTest implements Plugin.PluginBase {
icon = "src/en/noblemtl/icon.png";
site = "https://noblemtl.com/";
version = "1.0.0";
userAgent = "";
cookieString = "";
userAgent = "";
async popularNovels(
pageNo: number,
{ filters }: Plugin.PopularNovelsOptions<typeof this.filters>
+103 -104
View File
@@ -1,104 +1,103 @@
import { Plugin } from "@typings/plugin";
import { fetchApi, fetchFile } from "@libs/fetch";
import { NovelStatus } from "@libs/novelStatus";
import { load as parseHTML } from "cheerio";
class FreeWebNovel implements Plugin.PluginBase {
id = "FWN.com";
name = "Web NOVEL";
site = "https://freewebnovel.com";
version = "1.0.0";
icon = "src/en/freewebnovel/icon.png";
userAgent = "";
cookieString = "";
async popularNovels(
page: number,
{ showLatestNovels }: Plugin.PopularNovelsOptions,
): Promise<Plugin.NovelItem[]> {
const sort = showLatestNovels
? "/latest-release-novels/"
: "/completed-novels/";
const body = await fetchApi(this.site + sort + page).then((res) => res.text());
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = loadedCheerio(".li-row")
.map((index, element) => ({
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 novels;
}
async parseNovelAndChapters(url: string): Promise<Plugin.SourceNovel> {
const body = await fetchApi(url).then((res) => res.text());
const loadedCheerio = parseHTML(body);
const novel: Plugin.SourceNovel = { 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();
const chapters: Plugin.ChapterItem[] = loadedCheerio("#idData > li > a")
.map((index, element) => ({
name: loadedCheerio(element).attr("title") || "Chapter " + index,
releaseTime: null,
url: this.site + loadedCheerio(element).attr("href"),
}))
.get();
novel.chapters = chapters;
return novel;
}
async parseChapter(chapterUrl: string): Promise<string> {
const body = await fetchApi(chapterUrl).then((res) => res.text());
const loadedCheerio = parseHTML(body);
const chapterText = loadedCheerio("div.txt").html() || "";
return chapterText;
}
async searchNovels(
searchkey: string,
): Promise<Plugin.NovelItem[]> {
const body = await fetchApi(this.site + "/search/", {
method: "POST",
body: JSON.stringify({ searchkey }),
}).then((res) => res.text());
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = loadedCheerio(".li-row > .li > .con")
.map((index, element) => ({
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 novels;
}
fetchImage = fetchFile;
}
export default new FreeWebNovel();
import { Plugin } from "@typings/plugin";
import { fetchApi, fetchFile } from "@libs/fetch";
import { NovelStatus } from "@libs/novelStatus";
import { load as parseHTML } from "cheerio";
class FreeWebNovel implements Plugin.PluginBase {
id = "FWN.com";
name = "Web NOVEL";
site = "https://freewebnovel.com";
version = "1.0.0";
icon = "src/en/freewebnovel/icon.png";
userAgent = "";
async popularNovels(
page: number,
{ showLatestNovels }: Plugin.PopularNovelsOptions,
): Promise<Plugin.NovelItem[]> {
const sort = showLatestNovels
? "/latest-release-novels/"
: "/completed-novels/";
const body = await fetchApi(this.site + sort + page).then((res) => res.text());
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = loadedCheerio(".li-row")
.map((index, element) => ({
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 novels;
}
async parseNovelAndChapters(url: string): Promise<Plugin.SourceNovel> {
const body = await fetchApi(url).then((res) => res.text());
const loadedCheerio = parseHTML(body);
const novel: Plugin.SourceNovel = { 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();
const chapters: Plugin.ChapterItem[] = loadedCheerio("#idData > li > a")
.map((index, element) => ({
name: loadedCheerio(element).attr("title") || "Chapter " + index,
releaseTime: null,
url: this.site + loadedCheerio(element).attr("href"),
}))
.get();
novel.chapters = chapters;
return novel;
}
async parseChapter(chapterUrl: string): Promise<string> {
const body = await fetchApi(chapterUrl).then((res) => res.text());
const loadedCheerio = parseHTML(body);
const chapterText = loadedCheerio("div.txt").html() || "";
return chapterText;
}
async searchNovels(
searchkey: string,
): Promise<Plugin.NovelItem[]> {
const body = await fetchApi(this.site + "/search/", {
method: "POST",
body: JSON.stringify({ searchkey }),
}).then((res) => res.text());
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = loadedCheerio(".li-row > .li > .con")
.map((index, element) => ({
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 novels;
}
fetchImage = fetchFile;
}
export default new FreeWebNovel();
+415 -428
View File
@@ -1,428 +1,415 @@
import { load as parseHTML } from "cheerio";
import { fetchApi, fetchFile } from "@libs/fetch";
import { FilterTypes, Filters } from "@libs/filterInputs";
import { Plugin } from "@typings/plugin";
class NobleMTL implements Plugin.PluginBase {
id = "noblemtl";
name = "NobleMTL";
icon = "src/en/noblemtl/icon.png";
site = "https://noblemtl.com/";
version = "1.0.0";
userAgent = "";
cookieString = "";
async popularNovels(
pageNo: number,
{ filters }: Plugin.PopularNovelsOptions<typeof this.filters>
): Promise<Plugin.NovelItem[]> {
let link = `${this.site}series/?page=${pageNo}`;
if (filters.genres.value.length)
link += filters.genres.value.map((i) => `&genre[]=${i}`).join("");
if (filters.type.value.length)
link += filters.type.value.map((i) => `&lang[]=${i}`).join("");
link += "&status=" + filters.status.value;
link += "&order=" + filters.order.value;
const headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
const body = await fetchApi(link, { headers }).then((result) =>
result.text()
);
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = [];
loadedCheerio("article.bs").each(function () {
const novelName = loadedCheerio(this).find(".ntitle").text().trim();
let image = loadedCheerio(this).find("img");
const novelCover = image.attr("data-src") || image.attr("src");
const novelUrl = loadedCheerio(this).find("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 headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
const result = await fetchApi(url, { headers });
const body = await result.text();
let loadedCheerio = parseHTML(body);
const novel: Plugin.SourceNovel = {
url,
chapters: [],
};
novel.name = loadedCheerio(".entry-title").text();
novel.cover =
loadedCheerio("img.wp-post-image").attr("data-src") ||
loadedCheerio("img.wp-post-image").attr("src");
loadedCheerio("div.spe > span").each(function () {
const detailName = loadedCheerio(this).find("b").text().trim();
const detail = loadedCheerio(this)
.find("b")
.remove()
.end()
.text()
.trim();
switch (detailName) {
case "Author:":
novel.author = detail;
break;
case "Status:":
novel.status = detail;
break;
}
});
novel.genres = loadedCheerio(".genxed")
.text()
.trim()
.replace(/\s/g, ",");
loadedCheerio('div[itemprop="description"] h3,p.a,strong').remove();
novel.summary = loadedCheerio('div[itemprop="description"]')
.find("br")
.replaceWith("\n")
.end()
.text();
let chapter: 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;
chapter.push({
name: chapterName,
releaseTime: releaseDate,
url: chapterUrl,
});
});
novel.chapters = chapter.reverse();
return novel;
}
async parseChapter(chapterUrl: string): Promise<string> {
const headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
const result = await fetchApi(chapterUrl, { headers });
const body = await result.text();
const loadedCheerio = parseHTML(body);
let chapterText = loadedCheerio(".epcontent").html() || "";
return chapterText;
}
async searchNovels(
searchTerm: string,
pageNo?: number | undefined
): Promise<Plugin.NovelItem[]> {
const url = `${this.site}?s=${searchTerm}`;
const headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
const result = await fetchApi(url, { headers });
const body = await result.text();
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = [];
loadedCheerio("article.bs").each(function () {
const novelName = loadedCheerio(this).find(".ntitle").text().trim();
const novelCover = loadedCheerio(this).find("img").attr("src");
const novelUrl = loadedCheerio(this).find("a").attr("href");
if (!novelUrl) return;
novels.push({
name: novelName,
url: novelUrl,
cover: novelCover,
});
});
return novels;
}
async fetchImage(url: string): Promise<string | undefined> {
return await fetchFile(url);
}
filters = {
order: {
label: "Sort By",
type: FilterTypes.Picker,
options: [
{ label: "Default", value: "" },
{ label: "A-Z", value: "title" },
{ label: "Z-A", value: "titlereverse" },
{ label: "Latest Update", value: "update" },
{ label: "Latest Added", value: "latest" },
{ label: "Popular", value: "popular" },
],
value: "",
},
status: {
label: "Status",
options: [
{ label: "All", value: "" },
{ label: "Ongoing", value: "ongoing" },
{ label: "Hiatus", value: "hiatus" },
{ label: "Completed", value: "completed" },
],
type: FilterTypes.Picker,
value: "",
},
type: {
label: "Type",
options: [
{ label: "Chinese novel", value: "chinese-novel" },
{ label: "habyeol", value: "habyeol" },
{ label: "korean novel", value: "korean-novel" },
{ label: "Web Novel", value: "web-novel" },
{ label: "삼심", value: "%ec%82%bc%ec%8b%ac" },
{ label: "호곡", value: "%ed%98%b8%ea%b3%a1" },
],
type: FilterTypes.CheckboxGroup,
value: [],
},
genres: {
label: "Genres",
value: [],
options: [
{ label: "A.I", value: "a.i" },
{ label: "Academy", value: "academy" },
{ label: "Action", value: "action" },
{ label: "Adult", value: "adult" },
{ label: "Adventure", value: "adventure" },
{ label: "Alternative History", value: "alternative-history" },
{ label: "Another World", value: "another-world" },
{ label: "Apocalypse", value: "apocalypse" },
{ label: "Bromance", value: "bromance" },
{ label: "Comedy", value: "comedy" },
{ label: "Dark fantasy", value: "dark-fantasy" },
{ label: "Demons", value: "demons" },
{ label: "Drama", value: "drama" },
{ label: "Dystopia", value: "dystopia" },
{ label: "Ecchi", value: "ecchi" },
{ label: "Entertainment", value: "entertainment" },
{ label: "Exhaustion", value: "exhaustion" },
{ label: "Fanfiction", value: "fanfiction" },
{ label: "fantasy", value: "fantasy" },
{ label: "finance", value: "finance" },
{ label: "Full color", value: "full-color" },
{ label: "Game", value: "game" },
{ label: "Gender Bender", value: "gender-bender" },
{ label: "Genius", value: "genius" },
{ label: "Harem", value: "harem" },
{ label: "Hero", value: "hero" },
{ label: "Historical", value: "historical" },
{ label: "Hunter", value: "hunter" },
{ label: "korean novel", value: "korean-novel" },
{ label: "Light Novel", value: "light-novel" },
{
label: "List Adventure Manga Genres",
value: "list-adventure-manga-genres",
},
{ label: "Long Strip", value: "long-strip" },
{ label: "Love comedy", value: "love-comedy" },
{ label: "magic", value: "magic" },
{ label: "Manhua", value: "manhua" },
{ label: "Martial Arts", value: "martial-arts" },
{ label: "Mature", value: "mature" },
{ label: "Medieval", value: "medieval" },
{ label: "Misunderstanding", value: "misunderstanding" },
{ label: "Modern", value: "modern" },
{ label: "modern fantasy", value: "modern-fantasy" },
{ label: "music", value: "music" },
{ label: "Mystery", value: "mystery" },
{ label: "Necromancy", value: "necromancy" },
{ label: "No Romance", value: "no-romance" },
{ label: "NTL", value: "ntl" },
{ label: "o", value: "o" },
{ label: "Obsession", value: "obsession" },
{ label: "Politics", value: "politics" },
{ label: "Possession", value: "possession" },
{ label: "Programming", value: "programming" },
{ label: "Psychological", value: "psychological" },
{ label: "Pure Love", value: "pure-love" },
{ label: "Redemption", value: "redemption" },
{ label: "Regression", value: "regression" },
{ label: "Regret", value: "regret" },
{ label: "Reincarnation", value: "reincarnation" },
{ label: "Revenge", value: "revenge" },
{ label: "Romance", value: "romance" },
{ label: "Romance Fanrasy", value: "romance-fanrasy" },
{ label: "Salvation", value: "salvation" },
{ label: "School Life", value: "school-life" },
{ label: "Sci-fi", value: "sci-fi" },
{ label: "Science fiction", value: "science-fiction" },
{ label: "Seinen", value: "seinen" },
{ label: "Shounen", value: "shounen" },
{ label: "Slice of Life", value: "slice-of-life" },
{ label: "Soft yandere", value: "soft-yandere" },
{ label: "Sports", value: "sports" },
{ label: "Supernatural", value: "supernatural" },
{ label: "Survival", value: "survival" },
{ label: "system", value: "system" },
{ label: "Time limit", value: "time-limit" },
{ label: "Tragedy", value: "tragedy" },
{ label: "Transmigration", value: "transmigration" },
{ label: "TS", value: "ts" },
{ label: "Tsundere", value: "tsundere" },
{ label: "Unique", value: "unique" },
{ label: "Wholesome", value: "wholesome" },
{ label: "Wuxia", value: "wuxia" },
{ label: "Xuanhuan", value: "xuanhuan" },
{ label: "Yandere", value: "yandere" },
{ label: "Yuri", value: "yuri" },
],
type: FilterTypes.CheckboxGroup,
},
} satisfies Filters;
}
const Noble = new NobleMTL();
export default new NobleMTL();
import { load as parseHTML } from "cheerio";
import { fetchApi, fetchFile } from "@libs/fetch";
import { FilterTypes, Filters } from "@libs/filterInputs";
import { Plugin } from "@typings/plugin";
class NobleMTL implements Plugin.PluginBase {
id = "noblemtl";
name = "NobleMTL";
icon = "src/en/noblemtl/icon.png";
site = "https://noblemtl.com/";
version = "1.0.0";
userAgent = "";
async popularNovels(
pageNo: number,
{ filters }: Plugin.PopularNovelsOptions<typeof this.filters>
): Promise<Plugin.NovelItem[]> {
let link = `${this.site}series/?page=${pageNo}`;
if (filters.genres.value.length)
link += filters.genres.value.map((i) => `&genre[]=${i}`).join("");
if (filters.type.value.length)
link += filters.type.value.map((i) => `&lang[]=${i}`).join("");
link += "&status=" + filters.status.value;
link += "&order=" + filters.order.value;
const headers = new Headers();
const body = await fetchApi(link, { headers }).then((result) =>
result.text()
);
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = [];
loadedCheerio("article.bs").each(function () {
const novelName = loadedCheerio(this).find(".ntitle").text().trim();
let image = loadedCheerio(this).find("img");
const novelCover = image.attr("data-src") || image.attr("src");
const novelUrl = loadedCheerio(this).find("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 headers = new Headers();
const result = await fetchApi(url, { headers });
const body = await result.text();
let loadedCheerio = parseHTML(body);
const novel: Plugin.SourceNovel = {
url,
chapters: [],
};
novel.name = loadedCheerio(".entry-title").text();
novel.cover =
loadedCheerio("img.wp-post-image").attr("data-src") ||
loadedCheerio("img.wp-post-image").attr("src");
loadedCheerio("div.spe > span").each(function () {
const detailName = loadedCheerio(this).find("b").text().trim();
const detail = loadedCheerio(this)
.find("b")
.remove()
.end()
.text()
.trim();
switch (detailName) {
case "Author:":
novel.author = detail;
break;
case "Status:":
novel.status = detail;
break;
}
});
novel.genres = loadedCheerio(".genxed")
.text()
.trim()
.replace(/\s/g, ",");
loadedCheerio('div[itemprop="description"] h3,p.a,strong').remove();
novel.summary = loadedCheerio('div[itemprop="description"]')
.find("br")
.replaceWith("\n")
.end()
.text();
let chapter: 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;
chapter.push({
name: chapterName,
releaseTime: releaseDate,
url: chapterUrl,
});
});
novel.chapters = chapter.reverse();
return novel;
}
async parseChapter(chapterUrl: string): Promise<string> {
const headers = new Headers();
const result = await fetchApi(chapterUrl, { headers });
const body = await result.text();
const loadedCheerio = parseHTML(body);
let chapterText = loadedCheerio(".epcontent").html() || "";
return chapterText;
}
async searchNovels(
searchTerm: string,
pageNo?: number | undefined
): Promise<Plugin.NovelItem[]> {
const url = `${this.site}?s=${searchTerm}`;
const headers = new Headers();
const result = await fetchApi(url, { headers });
const body = await result.text();
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = [];
loadedCheerio("article.bs").each(function () {
const novelName = loadedCheerio(this).find(".ntitle").text().trim();
const novelCover = loadedCheerio(this).find("img").attr("src");
const novelUrl = loadedCheerio(this).find("a").attr("href");
if (!novelUrl) return;
novels.push({
name: novelName,
url: novelUrl,
cover: novelCover,
});
});
return novels;
}
async fetchImage(url: string): Promise<string | undefined> {
return await fetchFile(url);
}
filters = {
order: {
label: "Sort By",
type: FilterTypes.Picker,
options: [
{ label: "Default", value: "" },
{ label: "A-Z", value: "title" },
{ label: "Z-A", value: "titlereverse" },
{ label: "Latest Update", value: "update" },
{ label: "Latest Added", value: "latest" },
{ label: "Popular", value: "popular" },
],
value: "",
},
status: {
label: "Status",
options: [
{ label: "All", value: "" },
{ label: "Ongoing", value: "ongoing" },
{ label: "Hiatus", value: "hiatus" },
{ label: "Completed", value: "completed" },
],
type: FilterTypes.Picker,
value: "",
},
type: {
label: "Type",
options: [
{ label: "Chinese novel", value: "chinese-novel" },
{ label: "habyeol", value: "habyeol" },
{ label: "korean novel", value: "korean-novel" },
{ label: "Web Novel", value: "web-novel" },
{ label: "삼심", value: "%ec%82%bc%ec%8b%ac" },
{ label: "호곡", value: "%ed%98%b8%ea%b3%a1" },
],
type: FilterTypes.CheckboxGroup,
value: [],
},
genres: {
label: "Genres",
value: [],
options: [
{ label: "A.I", value: "a.i" },
{ label: "Academy", value: "academy" },
{ label: "Action", value: "action" },
{ label: "Adult", value: "adult" },
{ label: "Adventure", value: "adventure" },
{ label: "Alternative History", value: "alternative-history" },
{ label: "Another World", value: "another-world" },
{ label: "Apocalypse", value: "apocalypse" },
{ label: "Bromance", value: "bromance" },
{ label: "Comedy", value: "comedy" },
{ label: "Dark fantasy", value: "dark-fantasy" },
{ label: "Demons", value: "demons" },
{ label: "Drama", value: "drama" },
{ label: "Dystopia", value: "dystopia" },
{ label: "Ecchi", value: "ecchi" },
{ label: "Entertainment", value: "entertainment" },
{ label: "Exhaustion", value: "exhaustion" },
{ label: "Fanfiction", value: "fanfiction" },
{ label: "fantasy", value: "fantasy" },
{ label: "finance", value: "finance" },
{ label: "Full color", value: "full-color" },
{ label: "Game", value: "game" },
{ label: "Gender Bender", value: "gender-bender" },
{ label: "Genius", value: "genius" },
{ label: "Harem", value: "harem" },
{ label: "Hero", value: "hero" },
{ label: "Historical", value: "historical" },
{ label: "Hunter", value: "hunter" },
{ label: "korean novel", value: "korean-novel" },
{ label: "Light Novel", value: "light-novel" },
{
label: "List Adventure Manga Genres",
value: "list-adventure-manga-genres",
},
{ label: "Long Strip", value: "long-strip" },
{ label: "Love comedy", value: "love-comedy" },
{ label: "magic", value: "magic" },
{ label: "Manhua", value: "manhua" },
{ label: "Martial Arts", value: "martial-arts" },
{ label: "Mature", value: "mature" },
{ label: "Medieval", value: "medieval" },
{ label: "Misunderstanding", value: "misunderstanding" },
{ label: "Modern", value: "modern" },
{ label: "modern fantasy", value: "modern-fantasy" },
{ label: "music", value: "music" },
{ label: "Mystery", value: "mystery" },
{ label: "Necromancy", value: "necromancy" },
{ label: "No Romance", value: "no-romance" },
{ label: "NTL", value: "ntl" },
{ label: "o", value: "o" },
{ label: "Obsession", value: "obsession" },
{ label: "Politics", value: "politics" },
{ label: "Possession", value: "possession" },
{ label: "Programming", value: "programming" },
{ label: "Psychological", value: "psychological" },
{ label: "Pure Love", value: "pure-love" },
{ label: "Redemption", value: "redemption" },
{ label: "Regression", value: "regression" },
{ label: "Regret", value: "regret" },
{ label: "Reincarnation", value: "reincarnation" },
{ label: "Revenge", value: "revenge" },
{ label: "Romance", value: "romance" },
{ label: "Romance Fanrasy", value: "romance-fanrasy" },
{ label: "Salvation", value: "salvation" },
{ label: "School Life", value: "school-life" },
{ label: "Sci-fi", value: "sci-fi" },
{ label: "Science fiction", value: "science-fiction" },
{ label: "Seinen", value: "seinen" },
{ label: "Shounen", value: "shounen" },
{ label: "Slice of Life", value: "slice-of-life" },
{ label: "Soft yandere", value: "soft-yandere" },
{ label: "Sports", value: "sports" },
{ label: "Supernatural", value: "supernatural" },
{ label: "Survival", value: "survival" },
{ label: "system", value: "system" },
{ label: "Time limit", value: "time-limit" },
{ label: "Tragedy", value: "tragedy" },
{ label: "Transmigration", value: "transmigration" },
{ label: "TS", value: "ts" },
{ label: "Tsundere", value: "tsundere" },
{ label: "Unique", value: "unique" },
{ label: "Wholesome", value: "wholesome" },
{ label: "Wuxia", value: "wuxia" },
{ label: "Xuanhuan", value: "xuanhuan" },
{ label: "Yandere", value: "yandere" },
{ label: "Yuri", value: "yuri" },
],
type: FilterTypes.CheckboxGroup,
},
} satisfies Filters;
}
const Noble = new NobleMTL();
export default new NobleMTL();
+267 -280
View File
@@ -1,280 +1,267 @@
import { load as parseHTML } from "cheerio";
import { fetchApi, fetchFile } from "@libs/fetch";
import { FilterTypes, Filters } from "@libs/filterInputs";
import { Plugin } from "@typings/plugin";
class PandaMTL implements Plugin.PluginBase {
id = "pandamtl";
name = "PandaMTL";
icon = "src/en/wordpress/icon.png";
site = "https://pandamtl.com/";
version = "1.0.0";
userAgent = "";
cookieString = "";
async popularNovels(
pageNo: number,
{ filters }: Plugin.PopularNovelsOptions<typeof this.filters>
): Promise<Plugin.NovelItem[]> {
let link = `${this.site}series/?page=${pageNo}`;
if (filters.genres.value.length) {
link += filters.genres.value.map((i) => `&genre[]=${i}`).join("");
}
if (filters.type.value.length)
link += filters.type.value.map((i) => `&lang[]=${i}`).join("");
link += "&status=" + (filters?.status ? filters.status : "");
link += "&order=" + (filters?.order ? filters.order : "popular");
const headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
const body = await fetchApi(link, { headers }).then((result) =>
result.text()
);
const loadedCheerio = parseHTML(body);
const 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 headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
const result = await fetchApi(url, { headers });
const body = await result.text();
let loadedCheerio = parseHTML(body);
const novel: Plugin.SourceNovel = {
url,
chapters: [],
};
novel.name = loadedCheerio("h1.entry-title").text();
novel.cover =
loadedCheerio("img.wp-post-image").attr("data-src") ||
loadedCheerio("img.wp-post-image").attr("src");
loadedCheerio(".serl:nth-child(3) > span").each(function () {
const detailName = loadedCheerio(this).text().trim();
const detail = loadedCheerio(this).next().text().trim();
switch (detailName) {
case "Author":
novel.author = detail;
break;
}
});
novel.status = loadedCheerio(".sertostat > span").attr("class");
novel.genres = loadedCheerio(".sertogenre")
.children("a")
.map((i, el) => loadedCheerio(el).text())
.toArray()
.join(",");
novel.summary = loadedCheerio(".sersys")
.find("br")
.replaceWith("\n")
.end()
.text();
let chapter: 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;
chapter.push({
name: chapterName,
releaseTime: releaseDate,
url: chapterUrl,
});
});
novel.chapters = chapter.reverse();
return novel;
}
async parseChapter(chapterUrl: string): Promise<string> {
const headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
const result = await fetchApi(chapterUrl, { headers });
const body = await result.text();
const loadedCheerio = parseHTML(body);
let chapterText = loadedCheerio(".epcontent").html() || "";
return chapterText;
}
async searchNovels(
searchTerm: string,
pageNo?: number | undefined
): Promise<Plugin.NovelItem[]> {
const url = `${this.site}?s=${searchTerm}`;
const headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
const result = await fetchApi(url, { headers });
const body = await result.text();
const loadedCheerio = parseHTML(body);
const 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;
novels.push({
name: novelName,
url: novelUrl,
cover: novelCover,
});
});
return novels;
}
async fetchImage(url: string): Promise<string | undefined> {
return await fetchFile(url);
}
filters = {
order: {
label: "Sort By",
value: "",
options: [
{ label: "Default", value: "" },
{ label: "A-Z", value: "title" },
{ label: "Z-A", value: "titlereverse" },
{ label: "Latest Update", value: "update" },
{ label: "Latest Added", value: "latest" },
{ label: "Popular", value: "popular" },
],
type: FilterTypes.Picker,
},
status: {
label: "Status",
value: "",
options: [
{ label: "All", value: "" },
{ label: "Ongoing", value: "ongoing" },
{ label: "Hiatus", value: "hiatus" },
{ label: "Completed", value: "completed" },
],
type: FilterTypes.Picker,
},
type: {
value: [],
label: "Type",
options: [
{ label: "Light Novel (KR)", value: "light-novel-kr" },
{ label: "Web Novel", value: "web-novel" },
],
type: FilterTypes.CheckboxGroup,
},
genres: {
label: "Genres",
value: [],
options: [
{ label: "Action", value: "action" },
{ label: "Adult", value: "adult" },
{ label: "Adventure", value: "adventure" },
{ label: "Comedy", value: "comedy" },
{ label: "Ecchi", value: "ecchi" },
{ label: "Fantasy", value: "fantasy" },
{ label: "Harem", value: "harem" },
{ label: "Josei", value: "josei" },
{ label: "Martial Arts", value: "martial-arts" },
{ label: "Mature", value: "mature" },
{ label: "Romance", value: "romance" },
{ label: "School Life", value: "school-life" },
{ label: "Sci-fi", value: "sci-fi" },
{ label: "Seinen", value: "seinen" },
{ label: "Slice of Life", value: "slice-of-life" },
{ label: "Smut", value: "smut" },
{ label: "Sports", value: "sports" },
{ label: "Supernatural", value: "supernatural" },
{ label: "Tragedy", value: "tragedy" },
],
type: FilterTypes.CheckboxGroup,
},
} satisfies Filters;
}
export default new PandaMTL();
import { load as parseHTML } from "cheerio";
import { fetchApi, fetchFile } from "@libs/fetch";
import { FilterTypes, Filters } from "@libs/filterInputs";
import { Plugin } from "@typings/plugin";
class PandaMTL implements Plugin.PluginBase {
id = "pandamtl";
name = "PandaMTL";
icon = "src/en/wordpress/icon.png";
site = "https://pandamtl.com/";
version = "1.0.0";
userAgent = "";
async popularNovels(
pageNo: number,
{ filters }: Plugin.PopularNovelsOptions<typeof this.filters>
): Promise<Plugin.NovelItem[]> {
let link = `${this.site}series/?page=${pageNo}`;
if (filters.genres.value.length) {
link += filters.genres.value.map((i) => `&genre[]=${i}`).join("");
}
if (filters.type.value.length)
link += filters.type.value.map((i) => `&lang[]=${i}`).join("");
link += "&status=" + (filters?.status ? filters.status : "");
link += "&order=" + (filters?.order ? filters.order : "popular");
const headers = new Headers();
const body = await fetchApi(link, { headers }).then((result) =>
result.text()
);
const loadedCheerio = parseHTML(body);
const 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 headers = new Headers();
const result = await fetchApi(url, { headers });
const body = await result.text();
let loadedCheerio = parseHTML(body);
const novel: Plugin.SourceNovel = {
url,
chapters: [],
};
novel.name = loadedCheerio("h1.entry-title").text();
novel.cover =
loadedCheerio("img.wp-post-image").attr("data-src") ||
loadedCheerio("img.wp-post-image").attr("src");
loadedCheerio(".serl:nth-child(3) > span").each(function () {
const detailName = loadedCheerio(this).text().trim();
const detail = loadedCheerio(this).next().text().trim();
switch (detailName) {
case "Author":
novel.author = detail;
break;
}
});
novel.status = loadedCheerio(".sertostat > span").attr("class");
novel.genres = loadedCheerio(".sertogenre")
.children("a")
.map((i, el) => loadedCheerio(el).text())
.toArray()
.join(",");
novel.summary = loadedCheerio(".sersys")
.find("br")
.replaceWith("\n")
.end()
.text();
let chapter: 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;
chapter.push({
name: chapterName,
releaseTime: releaseDate,
url: chapterUrl,
});
});
novel.chapters = chapter.reverse();
return novel;
}
async parseChapter(chapterUrl: string): Promise<string> {
const headers = new Headers();
const result = await fetchApi(chapterUrl, { headers });
const body = await result.text();
const loadedCheerio = parseHTML(body);
let chapterText = loadedCheerio(".epcontent").html() || "";
return chapterText;
}
async searchNovels(
searchTerm: string,
pageNo?: number | undefined
): Promise<Plugin.NovelItem[]> {
const url = `${this.site}?s=${searchTerm}`;
const headers = new Headers();
const result = await fetchApi(url, { headers });
const body = await result.text();
const loadedCheerio = parseHTML(body);
const 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;
novels.push({
name: novelName,
url: novelUrl,
cover: novelCover,
});
});
return novels;
}
async fetchImage(url: string): Promise<string | undefined> {
return await fetchFile(url);
}
filters = {
order: {
label: "Sort By",
value: "",
options: [
{ label: "Default", value: "" },
{ label: "A-Z", value: "title" },
{ label: "Z-A", value: "titlereverse" },
{ label: "Latest Update", value: "update" },
{ label: "Latest Added", value: "latest" },
{ label: "Popular", value: "popular" },
],
type: FilterTypes.Picker,
},
status: {
label: "Status",
value: "",
options: [
{ label: "All", value: "" },
{ label: "Ongoing", value: "ongoing" },
{ label: "Hiatus", value: "hiatus" },
{ label: "Completed", value: "completed" },
],
type: FilterTypes.Picker,
},
type: {
value: [],
label: "Type",
options: [
{ label: "Light Novel (KR)", value: "light-novel-kr" },
{ label: "Web Novel", value: "web-novel" },
],
type: FilterTypes.CheckboxGroup,
},
genres: {
label: "Genres",
value: [],
options: [
{ label: "Action", value: "action" },
{ label: "Adult", value: "adult" },
{ label: "Adventure", value: "adventure" },
{ label: "Comedy", value: "comedy" },
{ label: "Ecchi", value: "ecchi" },
{ label: "Fantasy", value: "fantasy" },
{ label: "Harem", value: "harem" },
{ label: "Josei", value: "josei" },
{ label: "Martial Arts", value: "martial-arts" },
{ label: "Mature", value: "mature" },
{ label: "Romance", value: "romance" },
{ label: "School Life", value: "school-life" },
{ label: "Sci-fi", value: "sci-fi" },
{ label: "Seinen", value: "seinen" },
{ label: "Slice of Life", value: "slice-of-life" },
{ label: "Smut", value: "smut" },
{ label: "Sports", value: "sports" },
{ label: "Supernatural", value: "supernatural" },
{ label: "Tragedy", value: "tragedy" },
],
type: FilterTypes.CheckboxGroup,
},
} satisfies Filters;
}
export default new PandaMTL();
+1 -2
View File
@@ -9,7 +9,7 @@ class ChireadsPlugin implements Plugin.PluginBase {
site: string;
version: string;
userAgent: string;
cookieString: string;
constructor() {
this.id = "chireads.com";
this.name = "Chireads";
@@ -17,7 +17,6 @@ class ChireadsPlugin implements Plugin.PluginBase {
this.site = "https://chireads.com";
this.version = "1.0.0";
this.userAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36";
this.cookieString = "''";
}
parseNovels(loadedCheerio: CheerioAPI) {
return [];
+1 -2
View File
@@ -10,7 +10,7 @@ class NovelDeGlacePlugin implements Plugin.PluginBase{
site: string;
version: string;
userAgent: string;
cookieString: string;
constructor() {
this.id = "NDG.com";
this.name = "NovelDeGlace";
@@ -18,7 +18,6 @@ class NovelDeGlacePlugin implements Plugin.PluginBase{
this.site = "https://noveldeglace.com/";
this.version = "1.0.0";
this.userAgent = "''";
this.cookieString = "''";
}
async popularNovels(page: number): Promise<Plugin.NovelItem[]> {
+413 -426
View File
@@ -1,426 +1,413 @@
import { load as parseHTML } from "cheerio";
import { fetchApi, fetchFile } from "@libs/fetch";
import { FilterTypes, Filters } from "@libs/filterInputs";
import { Plugin } from "@typings/plugin";
class LightNovelBrasil implements Plugin.PluginBase {
id = "lightnovelbrasil";
name = "Light Novel Brasil";
icon = "multisrc/wpmangastream/icons/lightnovelbrasil.png";
site = "https://lightnovelbrasil.com/";
version = "1.0.0";
userAgent = "";
cookieString = "";
async popularNovels(
pageNo: number,
{ filters }: Plugin.PopularNovelsOptions<typeof this.filters>
): Promise<Plugin.NovelItem[]> {
let link = `${this.site}series/?page=${pageNo}`;
if (filters.genres.value.length)
link += filters.genres.value.map((i) => `&genre[]=${i}`).join("");
if (filters.type.value.length)
link += filters.type.value.map((i) => `&lang[]=${i}`).join("");
link += "&status=" + (filters?.status ? filters.status : "");
link += "&order=" + (filters?.order ? filters.order : "popular");
const headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
const body = await fetchApi(link, { headers }).then((result) =>
result.text()
);
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = [];
loadedCheerio("article.bs").each(function () {
const novelName = loadedCheerio(this).find(".ntitle").text().trim();
let image = loadedCheerio(this).find("img");
const novelCover = image.attr("data-src") || image.attr("src");
const novelUrl = loadedCheerio(this).find("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 headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
const result = await fetchApi(url, { headers });
const body = await result.text();
let loadedCheerio = parseHTML(body);
const novel: Plugin.SourceNovel = {
url,
chapters: [],
};
novel.name = loadedCheerio(".entry-title").text();
novel.cover =
loadedCheerio("img.wp-post-image").attr("data-src") ||
loadedCheerio("img.wp-post-image").attr("src");
loadedCheerio("div.spe > span").each(function () {
const detailName = loadedCheerio(this).find("b").text().trim();
const detail = loadedCheerio(this)
.find("b")
.remove()
.end()
.text()
.trim();
switch (detailName) {
case "Autor:":
case "Author:":
novel.author = detail;
break;
case "Status:":
novel.status = detail;
break;
}
});
novel.genres = loadedCheerio(".genxed")
.text()
.trim()
.replace(/\s/g, ",");
loadedCheerio('div[itemprop="description"] h3,p.a,strong').remove();
novel.summary = loadedCheerio('div[itemprop="description"]')
.find("br")
.replaceWith("\n")
.end()
.text();
let chapter: 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;
chapter.push({
name: chapterName,
releaseTime: releaseDate,
url: chapterUrl,
});
});
novel.chapters = chapter.reverse();
return novel;
}
async parseChapter(chapterUrl: string): Promise<string> {
const headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
const result = await fetchApi(chapterUrl, { headers });
const body = await result.text();
const loadedCheerio = parseHTML(body);
let chapterText = loadedCheerio(".epcontent").html() || "";
return chapterText;
}
async searchNovels(
searchTerm: string,
pageNo?: number | undefined
): Promise<Plugin.NovelItem[]> {
const url = `${this.site}?s=${searchTerm}`;
const headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
const result = await fetchApi(url, { headers });
const body = await result.text();
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = [];
loadedCheerio("article.bs").each(function () {
const novelName = loadedCheerio(this).find(".ntitle").text().trim();
const novelCover = loadedCheerio(this).find("img").attr("src");
const novelUrl = loadedCheerio(this).find("a").attr("href");
if (!novelUrl) return;
novels.push({
name: novelName,
url: novelUrl,
cover: novelCover,
});
});
return novels;
}
async fetchImage(url: string): Promise<string | undefined> {
return await fetchFile(url);
}
filters = {
order: {
label: "Sort By",
value: "",
options: [
{ label: "Default", value: "" },
{ label: "A-Z", value: "title" },
{ label: "Z-A", value: "titlereverse" },
{ label: "Latest Update", value: "update" },
{ label: "Latest Added", value: "latest" },
{ label: "Popular", value: "popular" },
],
type: FilterTypes.Picker,
},
status: {
label: "Status",
value: "",
options: [
{ label: "All", value: "" },
{ label: "Ongoing", value: "ongoing" },
{ label: "Hiatus", value: "hiatus" },
{ label: "Completed", value: "completed" },
],
type: FilterTypes.Picker,
},
type: {
label: "Type",
value: [],
options: [
{ label: "Chinese novel", value: "chinese-novel" },
{ label: "habyeol", value: "habyeol" },
{ label: "korean novel", value: "korean-novel" },
{ label: "Web Novel", value: "web-novel" },
{ label: "삼심", value: "%ec%82%bc%ec%8b%ac" },
{ label: "호곡", value: "%ed%98%b8%ea%b3%a1" },
],
type: FilterTypes.CheckboxGroup,
},
genres: {
value: [],
label: "Genres",
options: [
{ label: "A.I", value: "a.i" },
{ label: "Academy", value: "academy" },
{ label: "Action", value: "action" },
{ label: "Adult", value: "adult" },
{ label: "Adventure", value: "adventure" },
{ label: "Alternative History", value: "alternative-history" },
{ label: "Another World", value: "another-world" },
{ label: "Apocalypse", value: "apocalypse" },
{ label: "Bromance", value: "bromance" },
{ label: "Comedy", value: "comedy" },
{ label: "Dark fantasy", value: "dark-fantasy" },
{ label: "Demons", value: "demons" },
{ label: "Drama", value: "drama" },
{ label: "Dystopia", value: "dystopia" },
{ label: "Ecchi", value: "ecchi" },
{ label: "Entertainment", value: "entertainment" },
{ label: "Exhaustion", value: "exhaustion" },
{ label: "Fanfiction", value: "fanfiction" },
{ label: "fantasy", value: "fantasy" },
{ label: "finance", value: "finance" },
{ label: "Full color", value: "full-color" },
{ label: "Game", value: "game" },
{ label: "Gender Bender", value: "gender-bender" },
{ label: "Genius", value: "genius" },
{ label: "Harem", value: "harem" },
{ label: "Hero", value: "hero" },
{ label: "Historical", value: "historical" },
{ label: "Hunter", value: "hunter" },
{ label: "korean novel", value: "korean-novel" },
{ label: "Light Novel", value: "light-novel" },
{
label: "List Adventure Manga Genres",
value: "list-adventure-manga-genres",
},
{ label: "Long Strip", value: "long-strip" },
{ label: "Love comedy", value: "love-comedy" },
{ label: "magic", value: "magic" },
{ label: "Manhua", value: "manhua" },
{ label: "Martial Arts", value: "martial-arts" },
{ label: "Mature", value: "mature" },
{ label: "Medieval", value: "medieval" },
{ label: "Misunderstanding", value: "misunderstanding" },
{ label: "Modern", value: "modern" },
{ label: "modern fantasy", value: "modern-fantasy" },
{ label: "music", value: "music" },
{ label: "Mystery", value: "mystery" },
{ label: "Necromancy", value: "necromancy" },
{ label: "No Romance", value: "no-romance" },
{ label: "NTL", value: "ntl" },
{ label: "o", value: "o" },
{ label: "Obsession", value: "obsession" },
{ label: "Politics", value: "politics" },
{ label: "Possession", value: "possession" },
{ label: "Programming", value: "programming" },
{ label: "Psychological", value: "psychological" },
{ label: "Pure Love", value: "pure-love" },
{ label: "Redemption", value: "redemption" },
{ label: "Regression", value: "regression" },
{ label: "Regret", value: "regret" },
{ label: "Reincarnation", value: "reincarnation" },
{ label: "Revenge", value: "revenge" },
{ label: "Romance", value: "romance" },
{ label: "Romance Fanrasy", value: "romance-fanrasy" },
{ label: "Salvation", value: "salvation" },
{ label: "School Life", value: "school-life" },
{ label: "Sci-fi", value: "sci-fi" },
{ label: "Science fiction", value: "science-fiction" },
{ label: "Seinen", value: "seinen" },
{ label: "Shounen", value: "shounen" },
{ label: "Slice of Life", value: "slice-of-life" },
{ label: "Soft yandere", value: "soft-yandere" },
{ label: "Sports", value: "sports" },
{ label: "Supernatural", value: "supernatural" },
{ label: "Survival", value: "survival" },
{ label: "system", value: "system" },
{ label: "Time limit", value: "time-limit" },
{ label: "Tragedy", value: "tragedy" },
{ label: "Transmigration", value: "transmigration" },
{ label: "TS", value: "ts" },
{ label: "Tsundere", value: "tsundere" },
{ label: "Unique", value: "unique" },
{ label: "Wholesome", value: "wholesome" },
{ label: "Wuxia", value: "wuxia" },
{ label: "Xuanhuan", value: "xuanhuan" },
{ label: "Yandere", value: "yandere" },
{ label: "Yuri", value: "yuri" },
],
type: FilterTypes.CheckboxGroup,
},
} satisfies Filters;
}
export default new LightNovelBrasil();
import { load as parseHTML } from "cheerio";
import { fetchApi, fetchFile } from "@libs/fetch";
import { FilterTypes, Filters } from "@libs/filterInputs";
import { Plugin } from "@typings/plugin";
class LightNovelBrasil implements Plugin.PluginBase {
id = "lightnovelbrasil";
name = "Light Novel Brasil";
icon = "multisrc/wpmangastream/icons/lightnovelbrasil.png";
site = "https://lightnovelbrasil.com/";
version = "1.0.0";
userAgent = "";
async popularNovels(
pageNo: number,
{ filters }: Plugin.PopularNovelsOptions<typeof this.filters>
): Promise<Plugin.NovelItem[]> {
let link = `${this.site}series/?page=${pageNo}`;
if (filters.genres.value.length)
link += filters.genres.value.map((i) => `&genre[]=${i}`).join("");
if (filters.type.value.length)
link += filters.type.value.map((i) => `&lang[]=${i}`).join("");
link += "&status=" + (filters?.status ? filters.status : "");
link += "&order=" + (filters?.order ? filters.order : "popular");
const headers = new Headers();
const body = await fetchApi(link, { headers }).then((result) =>
result.text()
);
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = [];
loadedCheerio("article.bs").each(function () {
const novelName = loadedCheerio(this).find(".ntitle").text().trim();
let image = loadedCheerio(this).find("img");
const novelCover = image.attr("data-src") || image.attr("src");
const novelUrl = loadedCheerio(this).find("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 headers = new Headers();
const result = await fetchApi(url, { headers });
const body = await result.text();
let loadedCheerio = parseHTML(body);
const novel: Plugin.SourceNovel = {
url,
chapters: [],
};
novel.name = loadedCheerio(".entry-title").text();
novel.cover =
loadedCheerio("img.wp-post-image").attr("data-src") ||
loadedCheerio("img.wp-post-image").attr("src");
loadedCheerio("div.spe > span").each(function () {
const detailName = loadedCheerio(this).find("b").text().trim();
const detail = loadedCheerio(this)
.find("b")
.remove()
.end()
.text()
.trim();
switch (detailName) {
case "Autor:":
case "Author:":
novel.author = detail;
break;
case "Status:":
novel.status = detail;
break;
}
});
novel.genres = loadedCheerio(".genxed")
.text()
.trim()
.replace(/\s/g, ",");
loadedCheerio('div[itemprop="description"] h3,p.a,strong').remove();
novel.summary = loadedCheerio('div[itemprop="description"]')
.find("br")
.replaceWith("\n")
.end()
.text();
let chapter: 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;
chapter.push({
name: chapterName,
releaseTime: releaseDate,
url: chapterUrl,
});
});
novel.chapters = chapter.reverse();
return novel;
}
async parseChapter(chapterUrl: string): Promise<string> {
const headers = new Headers();
const result = await fetchApi(chapterUrl, { headers });
const body = await result.text();
const loadedCheerio = parseHTML(body);
let chapterText = loadedCheerio(".epcontent").html() || "";
return chapterText;
}
async searchNovels(
searchTerm: string,
pageNo?: number | undefined
): Promise<Plugin.NovelItem[]> {
const url = `${this.site}?s=${searchTerm}`;
const headers = new Headers();
const result = await fetchApi(url, { headers });
const body = await result.text();
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = [];
loadedCheerio("article.bs").each(function () {
const novelName = loadedCheerio(this).find(".ntitle").text().trim();
const novelCover = loadedCheerio(this).find("img").attr("src");
const novelUrl = loadedCheerio(this).find("a").attr("href");
if (!novelUrl) return;
novels.push({
name: novelName,
url: novelUrl,
cover: novelCover,
});
});
return novels;
}
async fetchImage(url: string): Promise<string | undefined> {
return await fetchFile(url);
}
filters = {
order: {
label: "Sort By",
value: "",
options: [
{ label: "Default", value: "" },
{ label: "A-Z", value: "title" },
{ label: "Z-A", value: "titlereverse" },
{ label: "Latest Update", value: "update" },
{ label: "Latest Added", value: "latest" },
{ label: "Popular", value: "popular" },
],
type: FilterTypes.Picker,
},
status: {
label: "Status",
value: "",
options: [
{ label: "All", value: "" },
{ label: "Ongoing", value: "ongoing" },
{ label: "Hiatus", value: "hiatus" },
{ label: "Completed", value: "completed" },
],
type: FilterTypes.Picker,
},
type: {
label: "Type",
value: [],
options: [
{ label: "Chinese novel", value: "chinese-novel" },
{ label: "habyeol", value: "habyeol" },
{ label: "korean novel", value: "korean-novel" },
{ label: "Web Novel", value: "web-novel" },
{ label: "삼심", value: "%ec%82%bc%ec%8b%ac" },
{ label: "호곡", value: "%ed%98%b8%ea%b3%a1" },
],
type: FilterTypes.CheckboxGroup,
},
genres: {
value: [],
label: "Genres",
options: [
{ label: "A.I", value: "a.i" },
{ label: "Academy", value: "academy" },
{ label: "Action", value: "action" },
{ label: "Adult", value: "adult" },
{ label: "Adventure", value: "adventure" },
{ label: "Alternative History", value: "alternative-history" },
{ label: "Another World", value: "another-world" },
{ label: "Apocalypse", value: "apocalypse" },
{ label: "Bromance", value: "bromance" },
{ label: "Comedy", value: "comedy" },
{ label: "Dark fantasy", value: "dark-fantasy" },
{ label: "Demons", value: "demons" },
{ label: "Drama", value: "drama" },
{ label: "Dystopia", value: "dystopia" },
{ label: "Ecchi", value: "ecchi" },
{ label: "Entertainment", value: "entertainment" },
{ label: "Exhaustion", value: "exhaustion" },
{ label: "Fanfiction", value: "fanfiction" },
{ label: "fantasy", value: "fantasy" },
{ label: "finance", value: "finance" },
{ label: "Full color", value: "full-color" },
{ label: "Game", value: "game" },
{ label: "Gender Bender", value: "gender-bender" },
{ label: "Genius", value: "genius" },
{ label: "Harem", value: "harem" },
{ label: "Hero", value: "hero" },
{ label: "Historical", value: "historical" },
{ label: "Hunter", value: "hunter" },
{ label: "korean novel", value: "korean-novel" },
{ label: "Light Novel", value: "light-novel" },
{
label: "List Adventure Manga Genres",
value: "list-adventure-manga-genres",
},
{ label: "Long Strip", value: "long-strip" },
{ label: "Love comedy", value: "love-comedy" },
{ label: "magic", value: "magic" },
{ label: "Manhua", value: "manhua" },
{ label: "Martial Arts", value: "martial-arts" },
{ label: "Mature", value: "mature" },
{ label: "Medieval", value: "medieval" },
{ label: "Misunderstanding", value: "misunderstanding" },
{ label: "Modern", value: "modern" },
{ label: "modern fantasy", value: "modern-fantasy" },
{ label: "music", value: "music" },
{ label: "Mystery", value: "mystery" },
{ label: "Necromancy", value: "necromancy" },
{ label: "No Romance", value: "no-romance" },
{ label: "NTL", value: "ntl" },
{ label: "o", value: "o" },
{ label: "Obsession", value: "obsession" },
{ label: "Politics", value: "politics" },
{ label: "Possession", value: "possession" },
{ label: "Programming", value: "programming" },
{ label: "Psychological", value: "psychological" },
{ label: "Pure Love", value: "pure-love" },
{ label: "Redemption", value: "redemption" },
{ label: "Regression", value: "regression" },
{ label: "Regret", value: "regret" },
{ label: "Reincarnation", value: "reincarnation" },
{ label: "Revenge", value: "revenge" },
{ label: "Romance", value: "romance" },
{ label: "Romance Fanrasy", value: "romance-fanrasy" },
{ label: "Salvation", value: "salvation" },
{ label: "School Life", value: "school-life" },
{ label: "Sci-fi", value: "sci-fi" },
{ label: "Science fiction", value: "science-fiction" },
{ label: "Seinen", value: "seinen" },
{ label: "Shounen", value: "shounen" },
{ label: "Slice of Life", value: "slice-of-life" },
{ label: "Soft yandere", value: "soft-yandere" },
{ label: "Sports", value: "sports" },
{ label: "Supernatural", value: "supernatural" },
{ label: "Survival", value: "survival" },
{ label: "system", value: "system" },
{ label: "Time limit", value: "time-limit" },
{ label: "Tragedy", value: "tragedy" },
{ label: "Transmigration", value: "transmigration" },
{ label: "TS", value: "ts" },
{ label: "Tsundere", value: "tsundere" },
{ label: "Unique", value: "unique" },
{ label: "Wholesome", value: "wholesome" },
{ label: "Wuxia", value: "wuxia" },
{ label: "Xuanhuan", value: "xuanhuan" },
{ label: "Yandere", value: "yandere" },
{ label: "Yuri", value: "yuri" },
],
type: FilterTypes.CheckboxGroup,
},
} satisfies Filters;
}
export default new LightNovelBrasil();
+241 -242
View File
@@ -1,242 +1,241 @@
import { Plugin } from "@typings/plugin";
import { FilterTypes, Filters } from "@libs/filterInputs";
import { fetchApi, fetchFile } from "@libs/fetch";
import { NovelStatus } from "@libs/novelStatus";
import { load as parseHTML } from "cheerio";
class freedlit implements Plugin.PluginBase {
id = "freedlit.space";
name = "LitSpace";
site = "https://freedlit.space";
version = "1.0.0";
icon = "src/ru/freedlit/icon.png";
userAgent = "";
cookieString = "";
async popularNovels(
page: number,
{ showLatestNovels, filters }: Plugin.PopularNovelsOptions<typeof this.filters>,
): Promise<Plugin.NovelItem[]> {
let url = this.site + "/get-books/all/list/" + page + "?sort=";
url += showLatestNovels ? "recent" : filters?.sort?.value || "popular";
url += "&status=" + (filters?.status?.value || "all");
url += "&access=" + (filters?.access?.value || "all");
url += "&adult=" + (filters?.adult?.value || "hide");
if (filters?.genre?.value?.include?.length) {
url += filters.genre.value.include
.map(id => '&genres_included[]=' + id).join("");
}
if (filters?.genre?.value?.exclude?.length) {
url += filters.genre.value.exclude
.map(id => '&genres_excluded[]=' + id).join("");
}
const body = await fetchApi(url).then((res) => res.text());
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = [];
loadedCheerio("#bookListBlock > div > div").each(function () {
const name = loadedCheerio(this).find("div > h4 > a").text()?.trim();
const cover = loadedCheerio(this)
.find("div > a > img")
.attr("src")
?.trim();
const url = loadedCheerio(this).find("div > h4 > a").attr("href")?.trim();
if (!name || !url) return;
novels.push({ name, cover, url });
});
return novels;
}
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> {
const body = await fetchApi(novelUrl).then((res) => res.text());
const loadedCheerio = parseHTML(body);
const novel: Plugin.SourceNovel = {
url: novelUrl,
name: loadedCheerio(".book-info h4").text(),
cover: loadedCheerio(".book-cover > div > img").attr("src")?.trim(),
summary: loadedCheerio("#nav-home").text()?.trim(),
author: loadedCheerio(".book-info h5 > a").text(),
genres: loadedCheerio(".genre-list > a")
.map((index, element) => loadedCheerio(element).text())
.get()
.join(","),
};
const chapters: Plugin.ChapterItem[] = [];
loadedCheerio("a.chapter-line").each(function () {
const name = loadedCheerio(this).find("h6").text();
const releaseTime = loadedCheerio(this).find('span[class="date"]').text();
const url = loadedCheerio(this).attr("href");
if (!name || !url) return;
chapters.push({ name, releaseTime, url });
});
novel.chapters = chapters;
return novel;
}
async parseChapter(chapterUrl: string): Promise<string> {
const body = await fetchApi(chapterUrl).then((res) => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio("div.mobile-block").remove();
loadedCheerio("div.standart-block").remove();
const chapterText = loadedCheerio('div[class="chapter"]').html() || "";
return chapterText;
}
async searchNovels(searchTerm: string): Promise<Plugin.NovelItem[]> {
const url = `${this.site}/search?query=${searchTerm}&type=all`;
const body = await fetchApi(url).then((res) => res.text());
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = [];
loadedCheerio("#bookListBlock > div").each(function () {
const name = loadedCheerio(this).find("h4 > a").text()?.trim();
const cover = loadedCheerio(this).find("a > img").attr("src")?.trim();
const url = loadedCheerio(this).find("h4 > a").attr("href")?.trim();
if (!name || !url) return;
novels.push({ name, cover, url });
});
return novels;
}
fetchImage = fetchFile;
filters = {
sort: {
label: "Сортировка:",
value: "",
options: [
{ label: "По популярности", value: "popular" },
{ label: "По количеству комментариев", value: "comments" },
{ label: "По количеству лайков", value: "likes" },
{ label: "По новизне", value: "recent" },
{ label: "По просмотрам", value: "views" },
],
type: 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: FilterTypes.ExcludableCheckboxGroup,
},
status: {
label: "Статус:",
value: "",
options: [
{ label: "Любой статус", value: "all" },
{ label: "В процессе", value: "in-process" },
{ label: "Завершено", value: "finished" },
],
type: FilterTypes.Picker,
},
access: {
label: "Доступ:",
value: "",
options: [
{ label: "Любой доступ", value: "all" },
{ label: "Бесплатные", value: "free" },
{ label: "Платные", value: "paid" },
],
type: FilterTypes.Picker,
},
adult: {
label: "Возрастные ограничения:",
value: "",
options: [
{ label: "Скрыть 18+", value: "hide" },
{ label: "Показать +18", value: "show" },
],
type: FilterTypes.Picker,
},
} satisfies Filters;
}
export default new freedlit();
import { Plugin } from "@typings/plugin";
import { FilterTypes, Filters } from "@libs/filterInputs";
import { fetchApi, fetchFile } from "@libs/fetch";
import { NovelStatus } from "@libs/novelStatus";
import { load as parseHTML } from "cheerio";
class freedlit implements Plugin.PluginBase {
id = "freedlit.space";
name = "LitSpace";
site = "https://freedlit.space";
version = "1.0.0";
icon = "src/ru/freedlit/icon.png";
userAgent = "";
async popularNovels(
page: number,
{ showLatestNovels, filters }: Plugin.PopularNovelsOptions<typeof this.filters>,
): Promise<Plugin.NovelItem[]> {
let url = this.site + "/get-books/all/list/" + page + "?sort=";
url += showLatestNovels ? "recent" : filters?.sort?.value || "popular";
url += "&status=" + (filters?.status?.value || "all");
url += "&access=" + (filters?.access?.value || "all");
url += "&adult=" + (filters?.adult?.value || "hide");
if (filters?.genre?.value?.include?.length) {
url += filters.genre.value.include
.map(id => '&genres_included[]=' + id).join("");
}
if (filters?.genre?.value?.exclude?.length) {
url += filters.genre.value.exclude
.map(id => '&genres_excluded[]=' + id).join("");
}
const body = await fetchApi(url).then((res) => res.text());
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = [];
loadedCheerio("#bookListBlock > div > div").each(function () {
const name = loadedCheerio(this).find("div > h4 > a").text()?.trim();
const cover = loadedCheerio(this)
.find("div > a > img")
.attr("src")
?.trim();
const url = loadedCheerio(this).find("div > h4 > a").attr("href")?.trim();
if (!name || !url) return;
novels.push({ name, cover, url });
});
return novels;
}
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> {
const body = await fetchApi(novelUrl).then((res) => res.text());
const loadedCheerio = parseHTML(body);
const novel: Plugin.SourceNovel = {
url: novelUrl,
name: loadedCheerio(".book-info h4").text(),
cover: loadedCheerio(".book-cover > div > img").attr("src")?.trim(),
summary: loadedCheerio("#nav-home").text()?.trim(),
author: loadedCheerio(".book-info h5 > a").text(),
genres: loadedCheerio(".genre-list > a")
.map((index, element) => loadedCheerio(element).text())
.get()
.join(","),
};
const chapters: Plugin.ChapterItem[] = [];
loadedCheerio("a.chapter-line").each(function () {
const name = loadedCheerio(this).find("h6").text();
const releaseTime = loadedCheerio(this).find('span[class="date"]').text();
const url = loadedCheerio(this).attr("href");
if (!name || !url) return;
chapters.push({ name, releaseTime, url });
});
novel.chapters = chapters;
return novel;
}
async parseChapter(chapterUrl: string): Promise<string> {
const body = await fetchApi(chapterUrl).then((res) => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio("div.mobile-block").remove();
loadedCheerio("div.standart-block").remove();
const chapterText = loadedCheerio('div[class="chapter"]').html() || "";
return chapterText;
}
async searchNovels(searchTerm: string): Promise<Plugin.NovelItem[]> {
const url = `${this.site}/search?query=${searchTerm}&type=all`;
const body = await fetchApi(url).then((res) => res.text());
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = [];
loadedCheerio("#bookListBlock > div").each(function () {
const name = loadedCheerio(this).find("h4 > a").text()?.trim();
const cover = loadedCheerio(this).find("a > img").attr("src")?.trim();
const url = loadedCheerio(this).find("h4 > a").attr("href")?.trim();
if (!name || !url) return;
novels.push({ name, cover, url });
});
return novels;
}
fetchImage = fetchFile;
filters = {
sort: {
label: "Сортировка:",
value: "",
options: [
{ label: "По популярности", value: "popular" },
{ label: "По количеству комментариев", value: "comments" },
{ label: "По количеству лайков", value: "likes" },
{ label: "По новизне", value: "recent" },
{ label: "По просмотрам", value: "views" },
],
type: 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: FilterTypes.ExcludableCheckboxGroup,
},
status: {
label: "Статус:",
value: "",
options: [
{ label: "Любой статус", value: "all" },
{ label: "В процессе", value: "in-process" },
{ label: "Завершено", value: "finished" },
],
type: FilterTypes.Picker,
},
access: {
label: "Доступ:",
value: "",
options: [
{ label: "Любой доступ", value: "all" },
{ label: "Бесплатные", value: "free" },
{ label: "Платные", value: "paid" },
],
type: FilterTypes.Picker,
},
adult: {
label: "Возрастные ограничения:",
value: "",
options: [
{ label: "Скрыть 18+", value: "hide" },
{ label: "Показать +18", value: "show" },
],
type: FilterTypes.Picker,
},
} satisfies Filters;
}
export default new freedlit();
File diff suppressed because it is too large Load Diff
+258 -259
View File
@@ -1,259 +1,258 @@
import { Plugin } from "@typings/plugin";
import { FilterTypes, Filters } from "@libs/filterInputs";
import { fetchApi, fetchFile } from "@libs/fetch";
import { NovelStatus } from "@libs/novelStatus";
import { load as parseHTML } from "cheerio";
import dayjs from "dayjs";
class Bookriver implements Plugin.PluginBase {
id = "bookriver";
name = "Bookriver";
site = "https://bookriver.ru";
version = "1.0.0";
icon = "src/ru/bookriver/icon.png";
userAgent = "";
cookieString = "";
async popularNovels(
pageNo: number,
{ showLatestNovels, filters }: Plugin.PopularNovelsOptions,
): Promise<Plugin.NovelItem[]> {
let url = this.site + `/genre?page=${pageNo}&perPage=24&sortingType=`;
url += showLatestNovels
? "last-update"
: filters?.sort?.value || "bestseller";
if (filters?.genres?.value instanceof Array && filters?.genres?.value.length) {
url += "&g=" + filters.genres.value.join(",");
}
const result = await fetchApi(url);
const body = await result.text();
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = [];
const jsonRaw = loadedCheerio("#__NEXT_DATA__").html();
if (jsonRaw) {
const json: response = JSON.parse(jsonRaw);
json.props.pageProps.state.pagesFilter?.genre?.books?.forEach((novel) =>
novels.push({
name: novel.name,
cover: novel.coverImages[0].url,
url: this.site + "/book/" + novel.slug,
}),
);
}
return novels;
}
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> {
const result = await fetchApi(novelUrl);
const body = await result.text();
const loadedCheerio = parseHTML(body);
const jsonRaw = loadedCheerio("#__NEXT_DATA__").html();
const json: response = JSON.parse(jsonRaw || "{}");
const book = json.props.pageProps.state.book?.bookPage;
const novel: Plugin.SourceNovel = {
url: novelUrl,
name: book?.name,
cover: book?.coverImages[0].url,
summary: book?.annotation,
author: book?.author?.name,
genres: book?.tags?.map((item) => item.name).join(", "),
status:
book?.statusComplete === "writing"
? NovelStatus.Ongoing
: NovelStatus.Completed,
};
const chapters: Plugin.ChapterItem[] = [];
book?.ebook?.chapters?.forEach((chapter) => {
if (chapter.available) {
chapters.push({
name: chapter.name,
releaseTime: dayjs(
chapter?.firstPublishedAt || chapter.createdAt,
).format("LLL"),
url: this.site + "/reader/" + book?.slug + "/" + chapter.chapterId,
});
}
});
novel.chapters = chapters;
return novel;
}
async parseChapter(chapterUrl: string): Promise<string> {
const url = "https://api.bookriver.ru/api/v1/books/chapter/text/";
const result = await fetchApi(url + chapterUrl.split("/").pop());
const json = (await result.json()) as responseChapter;
let chapterText = json.data.content || "Конец произведения";
if (json.data?.audio?.available) {
chapterText += "\n" + json.data.audio.url;
}
return chapterText;
}
async searchNovels(
searchTerm: string,
pageNo: number | undefined = 1,
): Promise<Plugin.NovelItem[]> {
const url = `https://api.bookriver.ru/api/v1/search/autocomplete?keyword=${searchTerm}&page=${pageNo}&perPage=10`;
const result = await fetchApi(url);
const json = (await result.json()) as responseSearch;
const novels: Plugin.NovelItem[] = [];
json?.data?.books?.forEach((novel) =>
novels.push({
name: novel.name,
cover: novel.coverImages[0].url,
url: this.site + "/book/" + novel.slug,
}),
);
return novels;
}
fetchImage = fetchFile;
filters = {
sort: {
label: "Сортировка",
value: "",
options: [
{ label: "Бестселлеры", value: "bestseller" },
{ label: "Дате добавления", value: "newest" },
{ label: "Дате обновления", value: "last-update" },
],
type: 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: FilterTypes.CheckboxGroup,
},
} satisfies Filters;
}
export default new Bookriver();
interface response {
props: {
pageProps: {
state: {
book?: {
bookPage: BooksEntity;
};
pagesFilter?: {
genre: {
books: BooksEntity[];
};
};
};
};
};
}
interface BooksEntity {
name: string;
coverImages: { url: string }[];
slug: string;
annotation?: string;
author?: {
name: string;
};
tags?: { name: string }[];
ebook?: {
chapters: Chapter[];
};
statusComplete: string;
}
interface Chapter {
name: string;
available: boolean;
firstPublishedAt?: Date | null;
createdAt?: Date | null;
chapterId: number | string;
}
interface responseChapter {
data: {
id: number;
bookId: number;
name: string;
content: string;
symbols: number;
number: number;
authorPages: number;
createdAt: string;
updatedAt: string;
firstPublishedAt: string;
status: string;
protected: boolean;
free: boolean;
audio?: {
available: boolean;
url: string;
duration: number;
};
publicationScheduledFor?: null;
};
}
interface responseSearch {
data: Data;
total: number;
}
interface Data {
books?: BooksEntity[] | null;
}
import { Plugin } from "@typings/plugin";
import { FilterTypes, Filters } from "@libs/filterInputs";
import { fetchApi, fetchFile } from "@libs/fetch";
import { NovelStatus } from "@libs/novelStatus";
import { load as parseHTML } from "cheerio";
import dayjs from "dayjs";
class Bookriver implements Plugin.PluginBase {
id = "bookriver";
name = "Bookriver";
site = "https://bookriver.ru";
version = "1.0.0";
icon = "src/ru/bookriver/icon.png";
userAgent = "";
async popularNovels(
pageNo: number,
{ showLatestNovels, filters }: Plugin.PopularNovelsOptions,
): Promise<Plugin.NovelItem[]> {
let url = this.site + `/genre?page=${pageNo}&perPage=24&sortingType=`;
url += showLatestNovels
? "last-update"
: filters?.sort?.value || "bestseller";
if (filters?.genres?.value instanceof Array && filters?.genres?.value.length) {
url += "&g=" + filters.genres.value.join(",");
}
const result = await fetchApi(url);
const body = await result.text();
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = [];
const jsonRaw = loadedCheerio("#__NEXT_DATA__").html();
if (jsonRaw) {
const json: response = JSON.parse(jsonRaw);
json.props.pageProps.state.pagesFilter?.genre?.books?.forEach((novel) =>
novels.push({
name: novel.name,
cover: novel.coverImages[0].url,
url: this.site + "/book/" + novel.slug,
}),
);
}
return novels;
}
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> {
const result = await fetchApi(novelUrl);
const body = await result.text();
const loadedCheerio = parseHTML(body);
const jsonRaw = loadedCheerio("#__NEXT_DATA__").html();
const json: response = JSON.parse(jsonRaw || "{}");
const book = json.props.pageProps.state.book?.bookPage;
const novel: Plugin.SourceNovel = {
url: novelUrl,
name: book?.name,
cover: book?.coverImages[0].url,
summary: book?.annotation,
author: book?.author?.name,
genres: book?.tags?.map((item) => item.name).join(", "),
status:
book?.statusComplete === "writing"
? NovelStatus.Ongoing
: NovelStatus.Completed,
};
const chapters: Plugin.ChapterItem[] = [];
book?.ebook?.chapters?.forEach((chapter) => {
if (chapter.available) {
chapters.push({
name: chapter.name,
releaseTime: dayjs(
chapter?.firstPublishedAt || chapter.createdAt,
).format("LLL"),
url: this.site + "/reader/" + book?.slug + "/" + chapter.chapterId,
});
}
});
novel.chapters = chapters;
return novel;
}
async parseChapter(chapterUrl: string): Promise<string> {
const url = "https://api.bookriver.ru/api/v1/books/chapter/text/";
const result = await fetchApi(url + chapterUrl.split("/").pop());
const json = (await result.json()) as responseChapter;
let chapterText = json.data.content || "Конец произведения";
if (json.data?.audio?.available) {
chapterText += "\n" + json.data.audio.url;
}
return chapterText;
}
async searchNovels(
searchTerm: string,
pageNo: number | undefined = 1,
): Promise<Plugin.NovelItem[]> {
const url = `https://api.bookriver.ru/api/v1/search/autocomplete?keyword=${searchTerm}&page=${pageNo}&perPage=10`;
const result = await fetchApi(url);
const json = (await result.json()) as responseSearch;
const novels: Plugin.NovelItem[] = [];
json?.data?.books?.forEach((novel) =>
novels.push({
name: novel.name,
cover: novel.coverImages[0].url,
url: this.site + "/book/" + novel.slug,
}),
);
return novels;
}
fetchImage = fetchFile;
filters = {
sort: {
label: "Сортировка",
value: "",
options: [
{ label: "Бестселлеры", value: "bestseller" },
{ label: "Дате добавления", value: "newest" },
{ label: "Дате обновления", value: "last-update" },
],
type: 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: FilterTypes.CheckboxGroup,
},
} satisfies Filters;
}
export default new Bookriver();
interface response {
props: {
pageProps: {
state: {
book?: {
bookPage: BooksEntity;
};
pagesFilter?: {
genre: {
books: BooksEntity[];
};
};
};
};
};
}
interface BooksEntity {
name: string;
coverImages: { url: string }[];
slug: string;
annotation?: string;
author?: {
name: string;
};
tags?: { name: string }[];
ebook?: {
chapters: Chapter[];
};
statusComplete: string;
}
interface Chapter {
name: string;
available: boolean;
firstPublishedAt?: Date | null;
createdAt?: Date | null;
chapterId: number | string;
}
interface responseChapter {
data: {
id: number;
bookId: number;
name: string;
content: string;
symbols: number;
number: number;
authorPages: number;
createdAt: string;
updatedAt: string;
firstPublishedAt: string;
status: string;
protected: boolean;
free: boolean;
audio?: {
available: boolean;
url: string;
duration: number;
};
publicationScheduledFor?: null;
};
}
interface responseSearch {
data: Data;
total: number;
}
interface Data {
books?: BooksEntity[] | null;
}
+2643 -2644
View File
File diff suppressed because it is too large Load Diff
+264 -265
View File
@@ -1,265 +1,264 @@
import { Plugin } from "@typings/plugin";
import { FilterTypes, Filters } from "@libs/filterInputs";
import { fetchApi, fetchFile } from "@libs/fetch";
import { NovelStatus } from "@libs/novelStatus";
import { load as parseHTML } from "cheerio";
class Jaomix implements Plugin.PluginBase {
id = "jaomix.ru";
name = "Jaomix";
site = "https://jaomix.ru";
version = "1.0.0";
icon = "src/ru/jaomix/icon.png";
userAgent = "";
cookieString = "";
async popularNovels(
pageNo: number,
{
showLatestNovels,
filters,
}: Plugin.PopularNovelsOptions<typeof this.filters>,
): Promise<Plugin.NovelItem[]> {
let url = this.site + "/?searchrn";
if (filters?.lang?.value?.length) {
url += filters.lang.value
.map((lang, idx) => `&lang[${idx}]=${lang}`).join("");
}
if (filters?.genre?.value?.include?.length) {
url += filters.genre.value.include
.map((genre, idx) => `&genre[${idx}]=${genre}`).join("");
}
if (filters?.genre?.value?.exclude?.length) {
url += filters.genre.value.exclude
.map((genre, idx) => `&delgenre[${idx}]=del ${genre}`).join("");
}
url += "&sortcountchapt=" + (filters?.sortcountchapt?.value || "1");
url += "&sortdaycreate=" + (filters?.sortdaycreate?.value || "1");
url +=
"&sortby=" + (showLatestNovels ? "upd" : filters?.sortby?.value || "topweek");
url += "&gpage=" + pageNo;
const body = await fetchApi(url).then((res) => res.text());
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = [];
loadedCheerio('div[class="block-home"] > div[class="one"]').each(
function () {
const name = loadedCheerio(this)
.find('div[class="img-home"] > a')
.attr("title");
const cover = loadedCheerio(this)
.find('div[class="img-home"] > a > img')
.attr("src")
?.replace("-150x150", "");
const url = loadedCheerio(this)
.find('div[class="img-home"] > a')
.attr("href");
if (!name || !url) return;
novels.push({ name, cover, url });
},
);
return novels;
}
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> {
const body = await fetchApi(novelUrl).then((res) => res.text());
const loadedCheerio = parseHTML(body);
const novel: Plugin.SourceNovel = {
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 () {
let 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.Ongoing
: NovelStatus.Completed;
}
});
const chapters: Plugin.ChapterItem[] = [];
loadedCheerio(".download-chapter div.title").each(function () {
const name = loadedCheerio(this).find("a").attr("title");
const releaseTime = loadedCheerio(this).find("time").text();
const url = loadedCheerio(this).find("a").attr("href");
if (!name || !url) return;
chapters.push({ name, releaseTime, url });
});
novel.chapters = chapters.reverse();
return novel;
}
async parseChapter(chapterUrl: string): Promise<string> {
const body = await fetchApi(chapterUrl).then((res) => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('div[class="adblock-service"]').remove();
const chapterText = loadedCheerio('div[class="entry-content"]').html();
return chapterText || "";
}
async searchNovels(
searchTerm: string,
pageNo: number | undefined = 1,
): Promise<Plugin.NovelItem[]> {
const url = `${this.site}/?searchrn=${searchTerm}&but=Поиск по названию&sortby=upd&gpage=${pageNo}`;
const body = await fetchApi(url).then((res) => res.text());
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = [];
loadedCheerio('div[class="block-home"] > div[class="one"]').each(
function () {
const name = loadedCheerio(this)
.find('div[class="img-home"] > a')
.attr("title");
const cover = loadedCheerio(this)
.find('div[class="img-home"] > a > img')
.attr("src")
?.replace("-150x150", "");
const url = loadedCheerio(this)
.find('div[class="img-home"] > a')
.attr("href");
if (!name || !url) return;
novels.push({ name, cover, url });
},
);
return novels;
}
fetchImage = fetchFile;
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: 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: 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: 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: FilterTypes.ExcludableCheckboxGroup,
},
lang: {
label: "Выбрать языки:",
value: [],
options: [
{ label: "Английский", value: "Английский" },
{ label: "Китайский", value: "Китайский" },
{ label: "Корейский", value: "Корейский" },
{ label: "Японский", value: "Японский" },
],
type: FilterTypes.CheckboxGroup,
},
} satisfies Filters;
}
export default new Jaomix();
import { Plugin } from "@typings/plugin";
import { FilterTypes, Filters } from "@libs/filterInputs";
import { fetchApi, fetchFile } from "@libs/fetch";
import { NovelStatus } from "@libs/novelStatus";
import { load as parseHTML } from "cheerio";
class Jaomix implements Plugin.PluginBase {
id = "jaomix.ru";
name = "Jaomix";
site = "https://jaomix.ru";
version = "1.0.0";
icon = "src/ru/jaomix/icon.png";
userAgent = "";
async popularNovels(
pageNo: number,
{
showLatestNovels,
filters,
}: Plugin.PopularNovelsOptions<typeof this.filters>,
): Promise<Plugin.NovelItem[]> {
let url = this.site + "/?searchrn";
if (filters?.lang?.value?.length) {
url += filters.lang.value
.map((lang, idx) => `&lang[${idx}]=${lang}`).join("");
}
if (filters?.genre?.value?.include?.length) {
url += filters.genre.value.include
.map((genre, idx) => `&genre[${idx}]=${genre}`).join("");
}
if (filters?.genre?.value?.exclude?.length) {
url += filters.genre.value.exclude
.map((genre, idx) => `&delgenre[${idx}]=del ${genre}`).join("");
}
url += "&sortcountchapt=" + (filters?.sortcountchapt?.value || "1");
url += "&sortdaycreate=" + (filters?.sortdaycreate?.value || "1");
url +=
"&sortby=" + (showLatestNovels ? "upd" : filters?.sortby?.value || "topweek");
url += "&gpage=" + pageNo;
const body = await fetchApi(url).then((res) => res.text());
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = [];
loadedCheerio('div[class="block-home"] > div[class="one"]').each(
function () {
const name = loadedCheerio(this)
.find('div[class="img-home"] > a')
.attr("title");
const cover = loadedCheerio(this)
.find('div[class="img-home"] > a > img')
.attr("src")
?.replace("-150x150", "");
const url = loadedCheerio(this)
.find('div[class="img-home"] > a')
.attr("href");
if (!name || !url) return;
novels.push({ name, cover, url });
},
);
return novels;
}
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> {
const body = await fetchApi(novelUrl).then((res) => res.text());
const loadedCheerio = parseHTML(body);
const novel: Plugin.SourceNovel = {
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 () {
let 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.Ongoing
: NovelStatus.Completed;
}
});
const chapters: Plugin.ChapterItem[] = [];
loadedCheerio(".download-chapter div.title").each(function () {
const name = loadedCheerio(this).find("a").attr("title");
const releaseTime = loadedCheerio(this).find("time").text();
const url = loadedCheerio(this).find("a").attr("href");
if (!name || !url) return;
chapters.push({ name, releaseTime, url });
});
novel.chapters = chapters.reverse();
return novel;
}
async parseChapter(chapterUrl: string): Promise<string> {
const body = await fetchApi(chapterUrl).then((res) => res.text());
const loadedCheerio = parseHTML(body);
loadedCheerio('div[class="adblock-service"]').remove();
const chapterText = loadedCheerio('div[class="entry-content"]').html();
return chapterText || "";
}
async searchNovels(
searchTerm: string,
pageNo: number | undefined = 1,
): Promise<Plugin.NovelItem[]> {
const url = `${this.site}/?searchrn=${searchTerm}&but=Поиск по названию&sortby=upd&gpage=${pageNo}`;
const body = await fetchApi(url).then((res) => res.text());
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = [];
loadedCheerio('div[class="block-home"] > div[class="one"]').each(
function () {
const name = loadedCheerio(this)
.find('div[class="img-home"] > a')
.attr("title");
const cover = loadedCheerio(this)
.find('div[class="img-home"] > a > img')
.attr("src")
?.replace("-150x150", "");
const url = loadedCheerio(this)
.find('div[class="img-home"] > a')
.attr("href");
if (!name || !url) return;
novels.push({ name, cover, url });
},
);
return novels;
}
fetchImage = fetchFile;
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: 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: 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: 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: FilterTypes.ExcludableCheckboxGroup,
},
lang: {
label: "Выбрать языки:",
value: [],
options: [
{ label: "Английский", value: "Английский" },
{ label: "Китайский", value: "Китайский" },
{ label: "Корейский", value: "Корейский" },
{ label: "Японский", value: "Японский" },
],
type: FilterTypes.CheckboxGroup,
},
} satisfies Filters;
}
export default new Jaomix();
+957 -958
View File
File diff suppressed because it is too large Load Diff

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