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.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
-1
View File
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
-1
View File
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
@@ -47,7 +47,6 @@ var WPmangaStreamPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
} }
WPmangaStreamPlugin.prototype.popularNovels = function (page) { WPmangaStreamPlugin.prototype.popularNovels = function (page) {
-1
View File
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
-1
View File
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
-1
View File
@@ -62,7 +62,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
-13
View File
@@ -47,7 +47,6 @@ var KolNovel = /** @class */ (function () {
this.site = "https://kolnovel.lol/"; this.site = "https://kolnovel.lol/";
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.filters = { this.filters = {
order: { order: {
label: "ترتيب حسب", label: "ترتيب حسب",
@@ -148,9 +147,6 @@ var KolNovel = /** @class */ (function () {
link += "&status=" + ((filters === null || filters === void 0 ? void 0 : filters.status) ? filters.status : ""); 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"); link += "&order=" + ((filters === null || filters === void 0 ? void 0 : filters.order) ? filters.order : "popular");
headers = new Headers(); 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 [4 /*yield*/, (0, fetch_1.fetchApi)(link, { headers: headers }).then(function (result) {
return result.text(); return result.text();
})]; })];
@@ -185,9 +181,6 @@ var KolNovel = /** @class */ (function () {
case 0: case 0:
url = novelUrl; url = novelUrl;
headers = new Headers(); headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, fetch(url, { headers: headers })]; return [4 /*yield*/, fetch(url, { headers: headers })];
case 1: case 1:
result = _a.sent(); result = _a.sent();
@@ -258,9 +251,6 @@ var KolNovel = /** @class */ (function () {
switch (_b.label) { switch (_b.label) {
case 0: case 0:
headers = new Headers(); headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, fetch(chapterUrl, { headers: headers })]; return [4 /*yield*/, fetch(chapterUrl, { headers: headers })];
case 1: case 1:
result = _b.sent(); result = _b.sent();
@@ -286,9 +276,6 @@ var KolNovel = /** @class */ (function () {
case 0: case 0:
url = "".concat(this.site, "?s=").concat(searchTerm); url = "".concat(this.site, "?s=").concat(searchTerm);
headers = new Headers(); headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })]; return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })];
case 1: case 1:
result = _a.sent(); result = _a.sent();
-13
View File
@@ -48,7 +48,6 @@ var Linovelib = /** @class */ (function () {
this.site = "https://w.linovelib.com"; this.site = "https://w.linovelib.com";
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.filters = { this.filters = {
sort: { sort: {
label: "Sort By", label: "Sort By",
@@ -83,9 +82,6 @@ var Linovelib = /** @class */ (function () {
link += filters.sort; link += filters.sort;
link += "/".concat(pageNo, ".html"); link += "/".concat(pageNo, ".html");
headers = new Headers(); 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 [4 /*yield*/, (0, fetch_1.fetchApi)(link, { headers: headers }).then(function (result) {
return result.text(); return result.text();
})]; })];
@@ -124,9 +120,6 @@ var Linovelib = /** @class */ (function () {
case 0: case 0:
url = novelUrl; url = novelUrl;
headers = new Headers(); headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })]; return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })];
case 1: case 1:
result = _b.sent(); result = _b.sent();
@@ -206,9 +199,6 @@ var Linovelib = /** @class */ (function () {
switch (_a.label) { switch (_a.label) {
case 0: case 0:
headers = new Headers(); headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
chapterText = "", pageText = ""; chapterText = "", pageText = "";
pageNumber = 1; pageNumber = 1;
skillgg = { skillgg = {
@@ -416,9 +406,6 @@ var Linovelib = /** @class */ (function () {
searchUrl = "".concat(this.site, "/search/"); searchUrl = "".concat(this.site, "/search/");
Term = encodeURI(searchTerm); Term = encodeURI(searchTerm);
headers = new Headers(); headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
pageNo = 1; pageNo = 1;
novels = []; novels = [];
addPage = function (pageCheerio, redirect) { return __awaiter(_this, void 0, void 0, function () { 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.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
@@ -62,7 +62,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
@@ -62,7 +62,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
-1
View File
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
-1
View File
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
-1
View File
@@ -50,7 +50,6 @@ var ReadwnPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.filters = metadata.filters; this.filters = metadata.filters;
} }
ReadwnPlugin.prototype.popularNovels = function (pageNo, _a) { ReadwnPlugin.prototype.popularNovels = function (pageNo, _a) {
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
@@ -62,7 +62,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
-1
View File
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
-1
View File
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
@@ -62,7 +62,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
-1
View File
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
@@ -62,7 +62,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
-1
View File
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
-1
View File
@@ -62,7 +62,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
-1
View File
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
@@ -62,7 +62,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
-1
View File
@@ -50,7 +50,6 @@ var ReadwnPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.filters = metadata.filters; this.filters = metadata.filters;
} }
ReadwnPlugin.prototype.popularNovels = function (pageNo, _a) { ReadwnPlugin.prototype.popularNovels = function (pageNo, _a) {
-1
View File
@@ -50,7 +50,6 @@ var ReadwnPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.filters = metadata.filters; this.filters = metadata.filters;
} }
ReadwnPlugin.prototype.popularNovels = function (pageNo, _a) { ReadwnPlugin.prototype.popularNovels = function (pageNo, _a) {
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
-1
View File
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
-1
View File
@@ -48,7 +48,6 @@ var BLN = /** @class */ (function () {
this.site = "https://bestlightnovel.com/"; this.site = "https://bestlightnovel.com/";
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
} }
BLN.prototype.popularNovels = function (pageNo, options) { BLN.prototype.popularNovels = function (pageNo, options) {
return __awaiter(this, void 0, void 0, function () { 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.site = "https://noblemtl.com/";
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.filters = { this.filters = {
picker: { picker: {
type: filterInputs_1.FilterTypes.Picker, type: filterInputs_1.FilterTypes.Picker,
-1
View File
@@ -46,7 +46,6 @@ var FreeWebNovel = /** @class */ (function () {
this.version = "1.0.0"; this.version = "1.0.0";
this.icon = "src/en/freewebnovel/icon.png"; this.icon = "src/en/freewebnovel/icon.png";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.fetchImage = fetch_1.fetchFile; this.fetchImage = fetch_1.fetchFile;
} }
FreeWebNovel.prototype.popularNovels = function (page, _a) { FreeWebNovel.prototype.popularNovels = function (page, _a) {
-13
View File
@@ -47,7 +47,6 @@ var NobleMTL = /** @class */ (function () {
this.site = "https://noblemtl.com/"; this.site = "https://noblemtl.com/";
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.filters = { this.filters = {
order: { order: {
label: "Sort By", label: "Sort By",
@@ -196,9 +195,6 @@ var NobleMTL = /** @class */ (function () {
link += "&status=" + filters.status.value; link += "&status=" + filters.status.value;
link += "&order=" + filters.order.value; link += "&order=" + filters.order.value;
headers = new Headers(); 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 [4 /*yield*/, (0, fetch_1.fetchApi)(link, { headers: headers }).then(function (result) {
return result.text(); return result.text();
})]; })];
@@ -233,9 +229,6 @@ var NobleMTL = /** @class */ (function () {
case 0: case 0:
url = novelUrl; url = novelUrl;
headers = new Headers(); headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })]; return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })];
case 1: case 1:
result = _a.sent(); result = _a.sent();
@@ -311,9 +304,6 @@ var NobleMTL = /** @class */ (function () {
switch (_a.label) { switch (_a.label) {
case 0: case 0:
headers = new Headers(); headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(chapterUrl, { headers: headers })]; return [4 /*yield*/, (0, fetch_1.fetchApi)(chapterUrl, { headers: headers })];
case 1: case 1:
result = _a.sent(); result = _a.sent();
@@ -335,9 +325,6 @@ var NobleMTL = /** @class */ (function () {
case 0: case 0:
url = "".concat(this.site, "?s=").concat(searchTerm); url = "".concat(this.site, "?s=").concat(searchTerm);
headers = new Headers(); headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })]; return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })];
case 1: case 1:
result = _a.sent(); result = _a.sent();
-13
View File
@@ -47,7 +47,6 @@ var PandaMTL = /** @class */ (function () {
this.site = "https://pandamtl.com/"; this.site = "https://pandamtl.com/";
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.filters = { this.filters = {
order: { order: {
label: "Sort By", 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 += "&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"); link += "&order=" + ((filters === null || filters === void 0 ? void 0 : filters.order) ? filters.order : "popular");
headers = new Headers(); 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 [4 /*yield*/, (0, fetch_1.fetchApi)(link, { headers: headers }).then(function (result) {
return result.text(); return result.text();
})]; })];
@@ -163,9 +159,6 @@ var PandaMTL = /** @class */ (function () {
case 0: case 0:
url = novelUrl; url = novelUrl;
headers = new Headers(); headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })]; return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })];
case 1: case 1:
result = _a.sent(); result = _a.sent();
@@ -234,9 +227,6 @@ var PandaMTL = /** @class */ (function () {
switch (_a.label) { switch (_a.label) {
case 0: case 0:
headers = new Headers(); headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(chapterUrl, { headers: headers })]; return [4 /*yield*/, (0, fetch_1.fetchApi)(chapterUrl, { headers: headers })];
case 1: case 1:
result = _a.sent(); result = _a.sent();
@@ -258,9 +248,6 @@ var PandaMTL = /** @class */ (function () {
case 0: case 0:
url = "".concat(this.site, "?s=").concat(searchTerm); url = "".concat(this.site, "?s=").concat(searchTerm);
headers = new Headers(); headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })]; return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })];
case 1: case 1:
result = _a.sent(); result = _a.sent();
@@ -47,7 +47,6 @@ var WPmangaStreamPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
} }
WPmangaStreamPlugin.prototype.popularNovels = function (page) { WPmangaStreamPlugin.prototype.popularNovels = function (page) {
-1
View File
@@ -46,7 +46,6 @@ var ChireadsPlugin = /** @class */ (function () {
this.site = "https://chireads.com"; this.site = "https://chireads.com";
this.version = "1.0.0"; 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.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) { ChireadsPlugin.prototype.parseNovels = function (loadedCheerio) {
return []; return [];
-1
View File
@@ -47,7 +47,6 @@ var NovelDeGlacePlugin = /** @class */ (function () {
this.site = "https://noveldeglace.com/"; this.site = "https://noveldeglace.com/";
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = "''"; this.userAgent = "''";
this.cookieString = "''";
} }
NovelDeGlacePlugin.prototype.popularNovels = function (page) { NovelDeGlacePlugin.prototype.popularNovels = function (page) {
return __awaiter(this, void 0, void 0, function () { return __awaiter(this, void 0, void 0, function () {
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
@@ -47,7 +47,6 @@ var LightNovelBrasil = /** @class */ (function () {
this.site = "https://lightnovelbrasil.com/"; this.site = "https://lightnovelbrasil.com/";
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.filters = { this.filters = {
order: { order: {
label: "Sort By", 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 += "&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"); link += "&order=" + ((filters === null || filters === void 0 ? void 0 : filters.order) ? filters.order : "popular");
headers = new Headers(); 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 [4 /*yield*/, (0, fetch_1.fetchApi)(link, { headers: headers }).then(function (result) {
return result.text(); return result.text();
})]; })];
@@ -233,9 +229,6 @@ var LightNovelBrasil = /** @class */ (function () {
case 0: case 0:
url = novelUrl; url = novelUrl;
headers = new Headers(); headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })]; return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })];
case 1: case 1:
result = _a.sent(); result = _a.sent();
@@ -312,9 +305,6 @@ var LightNovelBrasil = /** @class */ (function () {
switch (_a.label) { switch (_a.label) {
case 0: case 0:
headers = new Headers(); headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(chapterUrl, { headers: headers })]; return [4 /*yield*/, (0, fetch_1.fetchApi)(chapterUrl, { headers: headers })];
case 1: case 1:
result = _a.sent(); result = _a.sent();
@@ -336,9 +326,6 @@ var LightNovelBrasil = /** @class */ (function () {
case 0: case 0:
url = "".concat(this.site, "?s=").concat(searchTerm); url = "".concat(this.site, "?s=").concat(searchTerm);
headers = new Headers(); headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })]; return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })];
case 1: case 1:
result = _a.sent(); result = _a.sent();
@@ -49,7 +49,6 @@ var IfreedomPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.filters = metadata.filters; this.filters = metadata.filters;
} }
IfreedomPlugin.prototype.popularNovels = function (page, _a) { IfreedomPlugin.prototype.popularNovels = function (page, _a) {
-1
View File
@@ -50,7 +50,6 @@ var RulatePlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.filters = metadata.filters; this.filters = metadata.filters;
} }
RulatePlugin.prototype.popularNovels = function (pageNo, _a) { RulatePlugin.prototype.popularNovels = function (pageNo, _a) {
-1
View File
@@ -47,7 +47,6 @@ var freedlit = /** @class */ (function () {
this.version = "1.0.0"; this.version = "1.0.0";
this.icon = "src/ru/freedlit/icon.png"; this.icon = "src/ru/freedlit/icon.png";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.fetchImage = fetch_1.fetchFile; this.fetchImage = fetch_1.fetchFile;
this.filters = { this.filters = {
sort: { sort: {
-1
View File
@@ -50,7 +50,6 @@ var RulatePlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.filters = metadata.filters; this.filters = metadata.filters;
} }
RulatePlugin.prototype.popularNovels = function (pageNo, _a) { RulatePlugin.prototype.popularNovels = function (pageNo, _a) {
-1
View File
@@ -55,7 +55,6 @@ var AuthorToday = /** @class */ (function () {
this.site = "https://author.today"; this.site = "https://author.today";
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.fetchImage = fetch_1.fetchFile; this.fetchImage = fetch_1.fetchFile;
this.filters = { this.filters = {
sort: { sort: {
-1
View File
@@ -52,7 +52,6 @@ var Bookriver = /** @class */ (function () {
this.version = "1.0.0"; this.version = "1.0.0";
this.icon = "src/ru/bookriver/icon.png"; this.icon = "src/ru/bookriver/icon.png";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.fetchImage = fetch_1.fetchFile; this.fetchImage = fetch_1.fetchFile;
this.filters = { this.filters = {
sort: { sort: {
-1
View File
@@ -49,7 +49,6 @@ var ficbook = /** @class */ (function () {
this.version = "1.0.0"; this.version = "1.0.0";
this.icon = "src/ru/ficbook/icon.png"; this.icon = "src/ru/ficbook/icon.png";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.fetchImage = fetch_1.fetchFile; this.fetchImage = fetch_1.fetchFile;
this.filters = { this.filters = {
sort: { sort: {
-1
View File
@@ -48,7 +48,6 @@ var Jaomix = /** @class */ (function () {
this.version = "1.0.0"; this.version = "1.0.0";
this.icon = "src/ru/jaomix/icon.png"; this.icon = "src/ru/jaomix/icon.png";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.fetchImage = fetch_1.fetchFile; this.fetchImage = fetch_1.fetchFile;
this.filters = { this.filters = {
sortby: { sortby: {
-1
View File
@@ -53,7 +53,6 @@ var TL = /** @class */ (function () {
this.version = "1.0.0"; this.version = "1.0.0";
this.icon = "src/ru/noveltl/icon.png"; this.icon = "src/ru/noveltl/icon.png";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.fetchImage = fetch_1.fetchFile; this.fetchImage = fetch_1.fetchFile;
this.filters = { this.filters = {
tags: { tags: {
-1
View File
@@ -52,7 +52,6 @@ var RNBH = /** @class */ (function () {
this.site = "https://ranobehub.org/"; this.site = "https://ranobehub.org/";
this.icon = "src/ru/ranobehub/icon.png"; this.icon = "src/ru/ranobehub/icon.png";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.fetchImage = fetch_1.fetchFile; this.fetchImage = fetch_1.fetchFile;
this.filters = { this.filters = {
sort: { sort: {
-1
View File
@@ -53,7 +53,6 @@ var RLIB = /** @class */ (function () {
this.icon = "src/ru/ranobelib/icon.png"; this.icon = "src/ru/ranobelib/icon.png";
this.ui = undefined; this.ui = undefined;
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.fetchImage = fetch_1.fetchFile; this.fetchImage = fetch_1.fetchFile;
this.filters = { this.filters = {
sort: { sort: {
-1
View File
@@ -53,7 +53,6 @@ var RNRF = /** @class */ (function () {
this.version = "1.0.0"; this.version = "1.0.0";
this.icon = "src/ru/ranoberf/icon.png"; this.icon = "src/ru/ranoberf/icon.png";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.fetchImage = fetch_1.fetchFile; this.fetchImage = fetch_1.fetchFile;
this.filters = { this.filters = {
sort: { sort: {
-1
View File
@@ -51,7 +51,6 @@ var ReN = /** @class */ (function () {
this.version = "1.0.0"; this.version = "1.0.0";
this.icon = "src/ru/renovels/icon.png"; this.icon = "src/ru/renovels/icon.png";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.fetchImage = fetch_1.fetchFile; this.fetchImage = fetch_1.fetchFile;
this.filters = { this.filters = {
sort: { sort: {
@@ -49,7 +49,6 @@ var IfreedomPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.filters = metadata.filters; this.filters = metadata.filters;
} }
IfreedomPlugin.prototype.popularNovels = function (page, _a) { IfreedomPlugin.prototype.popularNovels = function (page, _a) {
-10
View File
@@ -50,7 +50,6 @@ var TuNovelaLigera = /** @class */ (function () {
this.site = "https://tunovelaligera.com/"; this.site = "https://tunovelaligera.com/";
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.filters = { this.filters = {
order: { order: {
value: "?m_orderby=rating", value: "?m_orderby=rating",
@@ -137,9 +136,6 @@ var TuNovelaLigera = /** @class */ (function () {
link += "/page/".concat(pageNo); link += "/page/".concat(pageNo);
link += filters.order; link += filters.order;
headers = new Headers(); headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(link, { headers: headers })]; return [4 /*yield*/, (0, fetch_1.fetchApi)(link, { headers: headers })];
case 1: case 1:
result = _b.sent(); result = _b.sent();
@@ -175,9 +171,6 @@ var TuNovelaLigera = /** @class */ (function () {
case 0: case 0:
url = novelUrl; url = novelUrl;
headers = new Headers(); headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })]; return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })];
case 1: case 1:
result = _c.sent(); result = _c.sent();
@@ -353,9 +346,6 @@ var TuNovelaLigera = /** @class */ (function () {
switch (_a.label) { switch (_a.label) {
case 0: case 0:
headers = new Headers(); headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(chapterUrl)]; return [4 /*yield*/, (0, fetch_1.fetchApi)(chapterUrl)];
case 1: case 1:
result = _a.sent(); result = _a.sent();
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
@@ -63,7 +63,6 @@ var MadaraPlugin = /** @class */ (function () {
this.site = metadata.sourceSite; this.site = metadata.sourceSite;
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.options = metadata.options; this.options = metadata.options;
this.filters = metadata.filters; this.filters = metadata.filters;
} }
-13
View File
@@ -47,7 +47,6 @@ var LSHNovel = /** @class */ (function () {
this.site = "https://lshnovel.com/"; this.site = "https://lshnovel.com/";
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.filters = { this.filters = {
order: { order: {
value: "popular", value: "popular",
@@ -144,9 +143,6 @@ var LSHNovel = /** @class */ (function () {
link += "&status=" + filters.status; link += "&status=" + filters.status;
link += "&order=" + filters.order; link += "&order=" + filters.order;
headers = new Headers(); 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 [4 /*yield*/, (0, fetch_1.fetchApi)(link, { headers: headers }).then(function (result) {
return result.text(); return result.text();
})]; })];
@@ -181,9 +177,6 @@ var LSHNovel = /** @class */ (function () {
case 0: case 0:
url = novelUrl; url = novelUrl;
headers = new Headers(); headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })]; return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })];
case 1: case 1:
result = _a.sent(); result = _a.sent();
@@ -259,9 +252,6 @@ var LSHNovel = /** @class */ (function () {
switch (_a.label) { switch (_a.label) {
case 0: case 0:
headers = new Headers(); headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(chapterUrl, { headers: headers })]; return [4 /*yield*/, (0, fetch_1.fetchApi)(chapterUrl, { headers: headers })];
case 1: case 1:
result = _a.sent(); result = _a.sent();
@@ -283,9 +273,6 @@ var LSHNovel = /** @class */ (function () {
case 0: case 0:
url = "".concat(this.site, "?s=").concat(searchTerm); url = "".concat(this.site, "?s=").concat(searchTerm);
headers = new Headers(); headers = new Headers();
if (this.cookieString) {
headers.append("cookie", this.cookieString);
}
return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })]; return [4 /*yield*/, (0, fetch_1.fetchApi)(url, { headers: headers })];
case 1: case 1:
result = _a.sent(); result = _a.sent();
-1
View File
@@ -50,7 +50,6 @@ var Smakolykytl = /** @class */ (function () {
this.version = "1.0.0"; this.version = "1.0.0";
this.icon = "src/ua/smakolykytl/icon.png"; this.icon = "src/ua/smakolykytl/icon.png";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
this.fetchImage = fetch_1.fetchFile; this.fetchImage = fetch_1.fetchFile;
} }
Smakolykytl.prototype.popularNovels = function (pageNo, _a) { Smakolykytl.prototype.popularNovels = function (pageNo, _a) {
-1
View File
@@ -47,7 +47,6 @@ var HakoPlugin = /** @class */ (function () {
this.site = "https://ln.hako.vn"; this.site = "https://ln.hako.vn";
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = ""; this.userAgent = "";
this.cookieString = "";
} }
HakoPlugin.prototype.parseNovels = function (loadedCheerio) { HakoPlugin.prototype.parseNovels = function (loadedCheerio) {
var _this = this; var _this = this;
-4
View File
@@ -40,10 +40,6 @@ npm install
``` ```
npm start npm start
``` ```
or
```
nodemon
```
+ Then open http://localhost:3000 + Then open http://localhost:3000
+29
View File
@@ -6,6 +6,19 @@ import express from "express";
import bodyParser from "body-parser"; import bodyParser from "body-parser";
import * as pluginApi from "./test_web/api/plugins"; import * as pluginApi from "./test_web/api/plugins";
import localizedFormat from "dayjs/plugin/localizedFormat"; 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 app = express();
const port = 3000; const port = 3000;
@@ -13,6 +26,14 @@ const host = "localhost";
const dirname = path.join(__dirname, ".."); 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(bodyParser.json());
app.use("/static", express.static(path.join(dirname, "test_web", "static"))); app.use("/static", express.static(path.join(dirname, "test_web", "static")));
app.use("/icons", express.static(path.join(dirname, "icons"))); app.use("/icons", express.static(path.join(dirname, "icons")));
@@ -20,6 +41,14 @@ app.get("/all_plugins", (req, res) => {
const allPlugins = pluginApi.all_plugins(); const allPlugins = pluginApi.all_plugins();
res.json(allPlugins); 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) => { app.post("/filters", async (req, res) => {
const filters = await pluginApi.getFilter(req.body['pluginRequirePath']); const filters = await pluginApi.getFilter(req.body['pluginRequirePath']);
res.json(filters || []); 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( export async function fetchApi(
url: string, url: string,
init?: RequestInit, init?: {
headers?: Record<string,string> | Headers;
[x: string]: string | Record<string,string> | undefined | FormData | Headers;
},
) { ) {
const headers = { let defaultHeaders: {
"User-Agent": defaultUserAgentString, 'User-Agent'?: string,
...init?.headers, 'Cookie'?: string,
}; } = {};
console.log(url, { ...init, headers }) try {
return await fetch(url, { ...init, headers }); 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) { 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/express": "^4.17.17",
"@types/jquery": "^3.5.28", "@types/jquery": "^3.5.28",
"@types/node": "^20.3.1", "@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": { "node_modules/@cspotcode/source-map-support": {
@@ -216,12 +216,6 @@
"integrity": "sha512-sU5MNKvSFdbT97qLSabU6jxceY9BfYQe9uF+b8E1rdTecpq9ROkkKoiHlblUlhgfaz9bdCByWjAI40Y3mHf1iQ==", "integrity": "sha512-sU5MNKvSFdbT97qLSabU6jxceY9BfYQe9uF+b8E1rdTecpq9ROkkKoiHlblUlhgfaz9bdCByWjAI40Y3mHf1iQ==",
"dev": true "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": { "node_modules/accepts": {
"version": "1.3.8", "version": "1.3.8",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
@@ -994,7 +988,7 @@
"version": "3.2.7", "version": "3.2.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
"devOptional": true, "optional": true,
"dependencies": { "dependencies": {
"ms": "^2.1.1" "ms": "^2.1.1"
} }
@@ -1194,6 +1188,12 @@
"url": "https://github.com/fb55/domutils?sponsor=1" "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": { "node_modules/duplexer2": {
"version": "0.1.4", "version": "0.1.4",
"resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz",
@@ -1334,6 +1334,21 @@
"es5-ext": "~0.10.14" "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": { "node_modules/events": {
"version": "3.3.0", "version": "3.3.0",
"resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
@@ -1548,6 +1563,12 @@
"node": ">= 0.6" "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": { "node_modules/fs.realpath": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
@@ -1670,15 +1691,6 @@
"node": ">= 0.4.0" "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": { "node_modules/has-property-descriptors": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz",
@@ -1866,12 +1878,6 @@
"node": ">= 4" "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": { "node_modules/image-size": {
"version": "0.5.5", "version": "0.5.5",
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", "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", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" "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": { "node_modules/md5.js": {
"version": "1.3.5", "version": "1.3.5",
"resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", "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", "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz",
"integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ=="
}, },
"node_modules/nodemon": { "node_modules/node-cleanup": {
"version": "2.0.22", "version": "2.1.2",
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz", "resolved": "https://registry.npmjs.org/node-cleanup/-/node-cleanup-2.1.2.tgz",
"integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==", "integrity": "sha512-qN8v/s2PAJwGUtr1/hYTpNKlD6Y9rc4p8KSmJXyGdYGZsDGKXrGThikLFP9OCHFeLeEpQzPwiAtdIvBLqm//Hw==",
"dev": true, "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/normalize-path": { "node_modules/normalize-path": {
"version": "3.0.0", "version": "3.0.0",
@@ -2644,6 +2619,15 @@
"node": ">=0.10.0" "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": { "node_modules/path-parse": {
"version": "1.0.7", "version": "1.0.7",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
@@ -2670,6 +2654,15 @@
"node": ">=8" "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": { "node_modules/pbkdf2": {
"version": "3.1.2", "version": "3.1.2",
"resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz",
@@ -2788,18 +2781,27 @@
"integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==", "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==",
"optional": true "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": { "node_modules/pseudomap": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
"integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==",
"dev": true "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": { "node_modules/public-encrypt": {
"version": "4.0.3", "version": "4.0.3",
"resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz",
@@ -3049,7 +3051,7 @@
"version": "5.7.1", "version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"devOptional": true, "optional": true,
"bin": { "bin": {
"semver": "bin/semver" "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": { "node_modules/slash": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
@@ -3260,6 +3241,18 @@
"os-shim": "^0.1.2" "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": { "node_modules/statuses": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
@@ -3290,6 +3283,15 @@
"node": ">= 6" "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": { "node_modules/stream-combiner2": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", "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", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" "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": { "node_modules/subarg": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz",
@@ -3353,18 +3364,6 @@
"minimist": "^1.1.0" "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": { "node_modules/supports-preserve-symlinks-flag": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "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": ">=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": { "node_modules/ts-node": {
"version": "10.9.1", "version": "10.9.1",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
@@ -3507,6 +3494,77 @@
"tsc-alias": "dist/bin/index.js" "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": { "node_modules/tslib": {
"version": "2.6.2", "version": "2.6.2",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
@@ -3574,12 +3632,6 @@
"undeclared-identifiers": "bin.js" "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": { "node_modules/unpipe": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
@@ -3884,12 +3936,6 @@
"integrity": "sha512-sU5MNKvSFdbT97qLSabU6jxceY9BfYQe9uF+b8E1rdTecpq9ROkkKoiHlblUlhgfaz9bdCByWjAI40Y3mHf1iQ==", "integrity": "sha512-sU5MNKvSFdbT97qLSabU6jxceY9BfYQe9uF+b8E1rdTecpq9ROkkKoiHlblUlhgfaz9bdCByWjAI40Y3mHf1iQ==",
"dev": true "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": { "accepts": {
"version": "1.3.8", "version": "1.3.8",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
@@ -4543,7 +4589,7 @@
"version": "3.2.7", "version": "3.2.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
"devOptional": true, "optional": true,
"requires": { "requires": {
"ms": "^2.1.1" "ms": "^2.1.1"
} }
@@ -4686,6 +4732,12 @@
"domhandler": "^5.0.3" "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": { "duplexer2": {
"version": "0.1.4", "version": "0.1.4",
"resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz",
@@ -4803,6 +4855,21 @@
"es5-ext": "~0.10.14" "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": { "events": {
"version": "3.3.0", "version": "3.3.0",
"resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "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", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
"integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==" "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": { "fs.realpath": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
@@ -5083,12 +5156,6 @@
"function-bind": "^1.1.1" "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": { "has-property-descriptors": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", "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", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
"integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==" "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": { "image-size": {
"version": "0.5.5", "version": "0.5.5",
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", "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", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" "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": { "md5.js": {
"version": "1.3.5", "version": "1.3.5",
"resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", "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", "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz",
"integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ=="
}, },
"nodemon": { "node-cleanup": {
"version": "2.0.22", "version": "2.1.2",
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz", "resolved": "https://registry.npmjs.org/node-cleanup/-/node-cleanup-2.1.2.tgz",
"integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==", "integrity": "sha512-qN8v/s2PAJwGUtr1/hYTpNKlD6Y9rc4p8KSmJXyGdYGZsDGKXrGThikLFP9OCHFeLeEpQzPwiAtdIvBLqm//Hw==",
"dev": true, "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"
}
}, },
"normalize-path": { "normalize-path": {
"version": "3.0.0", "version": "3.0.0",
@@ -5797,6 +5843,12 @@
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" "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": { "path-parse": {
"version": "1.0.7", "version": "1.0.7",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "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", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
"integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" "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": { "pbkdf2": {
"version": "3.1.2", "version": "3.1.2",
"resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz",
@@ -5899,18 +5960,21 @@
"integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==", "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==",
"optional": true "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": { "pseudomap": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
"integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==",
"dev": true "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": { "public-encrypt": {
"version": "4.0.3", "version": "4.0.3",
"resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz",
@@ -6094,7 +6158,7 @@
"version": "5.7.1", "version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"devOptional": true "optional": true
}, },
"send": { "send": {
"version": "0.18.0", "version": "0.18.0",
@@ -6212,23 +6276,6 @@
"resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",
"integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" "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": { "slash": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
@@ -6254,6 +6301,15 @@
"os-shim": "^0.1.2" "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": { "statuses": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", "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": { "stream-combiner2": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", "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": { "subarg": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz",
@@ -6344,15 +6415,6 @@
"minimist": "^1.1.0" "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": { "supports-preserve-symlinks-flag": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "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", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" "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": { "ts-node": {
"version": "10.9.1", "version": "10.9.1",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
@@ -6452,6 +6505,55 @@
"plimit-lit": "^1.2.6" "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": { "tslib": {
"version": "2.6.2", "version": "2.6.2",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
@@ -6503,12 +6605,6 @@
"xtend": "^4.0.1" "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": { "unpipe": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
+6 -6
View File
@@ -1,17 +1,17 @@
{ {
"name": "lnreader-plugins", "name": "lnreader-plugins",
"version": "1.0.0", "version": "1.0.0",
"description": "", "description": "Plugins repo for LNReader",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"start": "nodemon", "start": "tsc-watch --onSuccess \"node ./.js/index.js\"",
"test": "exit 0", "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", "generate": "ts-node ./scripts/multisrc/generate.ts && tsc",
"clearMulti": "ts-node ./scripts/clearMultisrc.ts", "clearMulti": "ts-node ./scripts/clearMultisrc.ts",
"less": "npx less ./test_web/static/css/index.less ./test_web/static/css/index.css" "less": "npx less ./test_web/static/css/index.less ./test_web/static/css/index.css"
}, },
"author": "", "author": "LNReader",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"body-parser": "^1.20.2", "body-parser": "^1.20.2",
@@ -38,8 +38,8 @@
"@types/express": "^4.17.17", "@types/express": "^4.17.17",
"@types/jquery": "^3.5.28", "@types/jquery": "^3.5.28",
"@types/node": "^20.3.1", "@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": [ "pre-commit": [
"json" "json"
+315 -328
View File
@@ -1,328 +1,315 @@
import { load as parseHTML } from "cheerio"; import { load as parseHTML } from "cheerio";
import { fetchApi, fetchFile } from "@libs/fetch"; import { fetchApi, fetchFile } from "@libs/fetch";
import { FilterTypes, Filters } from "@libs/filterInputs"; import { FilterTypes, Filters } from "@libs/filterInputs";
import { Plugin } from "@typings/plugin"; import { Plugin } from "@typings/plugin";
class KolNovel implements Plugin.PluginBase { class KolNovel implements Plugin.PluginBase {
id = "kolnovel"; id = "kolnovel";
name = "KolNovel"; name = "KolNovel";
icon = "multisrc/wpmangastream/icons/kolnovel.png"; icon = "multisrc/wpmangastream/icons/kolnovel.png";
site = "https://kolnovel.lol/"; site = "https://kolnovel.lol/";
version = "1.0.0"; version = "1.0.0";
userAgent = ""; userAgent = "";
cookieString = ""; async popularNovels(
async popularNovels( pageNo: number,
pageNo: number, { filters }: Plugin.PopularNovelsOptions<typeof this.filters>
{ filters }: Plugin.PopularNovelsOptions<typeof this.filters> ): Promise<Plugin.NovelItem[]> {
): Promise<Plugin.NovelItem[]> { let link = `${this.site}series/?page=${pageNo}`;
let link = `${this.site}series/?page=${pageNo}`;
if (filters.genres.value.length)
if (filters.genres.value.length) link += filters.genres.value.map((i) => `&genre[]=${i}`).join("");
link += filters.genres.value.map((i) => `&genre[]=${i}`).join(""); if (filters.type.value.length)
if (filters.type.value.length) link += filters.type.value.map((i) => `&lang[]=${i}`).join("");
link += filters.type.value.map((i) => `&lang[]=${i}`).join("");
link += "&status=" + (filters?.status ? filters.status : "");
link += "&status=" + (filters?.status ? filters.status : "");
link += "&order=" + (filters?.order ? filters.order : "popular");
link += "&order=" + (filters?.order ? filters.order : "popular"); const headers = new Headers();
const headers = new Headers(); const body = await fetchApi(link, { headers }).then((result) =>
if (this.cookieString) { result.text()
headers.append("cookie", this.cookieString); );
}
const body = await fetchApi(link, { headers }).then((result) => const loadedCheerio = parseHTML(body);
result.text()
); const novels: Plugin.NovelItem[] = [];
const loadedCheerio = parseHTML(body); loadedCheerio("article.maindet").each(function () {
const novelName = loadedCheerio(this).find("h2").text();
const novels: Plugin.NovelItem[] = []; let image = loadedCheerio(this).find("img");
const novelCover = image.attr("data-src") || image.attr("src");
loadedCheerio("article.maindet").each(function () { const novelUrl = loadedCheerio(this).find("h2 a").attr("href");
const novelName = loadedCheerio(this).find("h2").text();
let image = loadedCheerio(this).find("img"); if (!novelUrl) return;
const novelCover = image.attr("data-src") || image.attr("src");
const novelUrl = loadedCheerio(this).find("h2 a").attr("href"); const novel = {
name: novelName,
if (!novelUrl) return; cover: novelCover,
url: novelUrl,
const novel = { };
name: novelName,
cover: novelCover, novels.push(novel);
url: novelUrl, });
};
return novels;
novels.push(novel); }
}); async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> {
const url = novelUrl;
return novels; const headers = new Headers();
} const result = await fetch(url, { headers });
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> { const body = await result.text();
const url = novelUrl;
const headers = new Headers(); let loadedCheerio = parseHTML(body);
if (this.cookieString) {
headers.append("cookie", this.cookieString); const novel: Plugin.SourceNovel = {
} url,
const result = await fetch(url, { headers }); chapters: [],
const body = await result.text(); };
let loadedCheerio = parseHTML(body); novel.name = loadedCheerio("h1.entry-title").text();
const novel: Plugin.SourceNovel = { novel.cover =
url, loadedCheerio("img.wp-post-image").attr("data-src") ||
chapters: [], loadedCheerio("img.wp-post-image").attr("src");
};
loadedCheerio("div.serl:nth-child(3) > span").each(function () {
novel.name = loadedCheerio("h1.entry-title").text(); const detailName = loadedCheerio(this).text().trim();
const detail = loadedCheerio(this).next().text().trim();
novel.cover =
loadedCheerio("img.wp-post-image").attr("data-src") || switch (detailName) {
loadedCheerio("img.wp-post-image").attr("src"); case "الكاتب":
case "Author":
loadedCheerio("div.serl:nth-child(3) > span").each(function () { novel.author = detail;
const detailName = loadedCheerio(this).text().trim(); break;
const detail = loadedCheerio(this).next().text().trim(); }
});
switch (detailName) {
case "الكاتب": novel.status = loadedCheerio("div.sertostat > span").attr("class");
case "Author":
novel.author = detail; novel.genres = loadedCheerio(".sertogenre")
break; .children("a")
} .map((i, el) => loadedCheerio(el).text())
}); .toArray()
.join(",");
novel.status = loadedCheerio("div.sertostat > span").attr("class");
novel.summary = loadedCheerio(".sersys")
novel.genres = loadedCheerio(".sertogenre") .find("br")
.children("a") .replaceWith("\n")
.map((i, el) => loadedCheerio(el).text()) .end()
.toArray() .text();
.join(",");
let chapter: Plugin.ChapterItem[] = [];
novel.summary = loadedCheerio(".sersys")
.find("br") loadedCheerio(".eplister")
.replaceWith("\n") .find("li")
.end() .each(function () {
.text(); const chapterName =
loadedCheerio(this).find(".epl-num").text() +
let chapter: Plugin.ChapterItem[] = []; " - " +
loadedCheerio(this).find(".epl-title").text();
loadedCheerio(".eplister")
.find("li") const releaseDate = loadedCheerio(this)
.each(function () { .find(".epl-date")
const chapterName = .text()
loadedCheerio(this).find(".epl-num").text() + .trim();
" - " +
loadedCheerio(this).find(".epl-title").text(); const chapterUrl = loadedCheerio(this).find("a").attr("href");
const releaseDate = loadedCheerio(this) if (!chapterUrl) return;
.find(".epl-date")
.text() chapter.push({
.trim(); name: chapterName,
releaseTime: releaseDate,
const chapterUrl = loadedCheerio(this).find("a").attr("href"); url: chapterUrl,
});
if (!chapterUrl) return; });
chapter.push({ novel.chapters = chapter.reverse();
name: chapterName,
releaseTime: releaseDate, return novel;
url: chapterUrl, }
}); async parseChapter(chapterUrl: string): Promise<string> {
}); const headers = new Headers();
const result = await fetch(chapterUrl, { headers });
novel.chapters = chapter.reverse(); const body = await result.text();
return novel; const loadedCheerio = parseHTML(body);
}
async parseChapter(chapterUrl: string): Promise<string> { loadedCheerio(".epcontent > div, i").remove();
const headers = new Headers(); let ignore = loadedCheerio("article > style").text().trim().split(",");
if (this.cookieString) { ignore.push(...(ignore.pop()?.match(/^\.\w+/) || []));
headers.append("cookie", this.cookieString); ignore.map((tag) => loadedCheerio(`p${tag}`).remove());
}
const result = await fetch(chapterUrl, { headers }); let chapterText = loadedCheerio(".epcontent").html() || "";
const body = await result.text();
return chapterText;
const loadedCheerio = parseHTML(body); }
async searchNovels(
loadedCheerio(".epcontent > div, i").remove(); searchTerm: string,
let ignore = loadedCheerio("article > style").text().trim().split(","); pageNo?: number | undefined
ignore.push(...(ignore.pop()?.match(/^\.\w+/) || [])); ): Promise<Plugin.NovelItem[]> {
ignore.map((tag) => loadedCheerio(`p${tag}`).remove()); const url = `${this.site}?s=${searchTerm}`;
const headers = new Headers();
let chapterText = loadedCheerio(".epcontent").html() || ""; const result = await fetchApi(url, { headers });
const body = await result.text();
return chapterText;
} const loadedCheerio = parseHTML(body);
async searchNovels(
searchTerm: string, const novels: Plugin.NovelItem[] = [];
pageNo?: number | undefined
): Promise<Plugin.NovelItem[]> { loadedCheerio("article.maindet").each(function () {
const url = `${this.site}?s=${searchTerm}`; const novelName = loadedCheerio(this).find("h2").text();
const headers = new Headers(); let image = loadedCheerio(this).find("img");
if (this.cookieString) { const novelCover = image.attr("data-src") || image.attr("src");
headers.append("cookie", this.cookieString); const novelUrl = loadedCheerio(this).find("h2 a").attr("href");
}
const result = await fetchApi(url, { headers }); if (!novelUrl) return;
const body = await result.text();
novels.push({
const loadedCheerio = parseHTML(body); name: novelName,
url: novelUrl,
const novels: Plugin.NovelItem[] = []; cover: novelCover,
});
loadedCheerio("article.maindet").each(function () { });
const novelName = loadedCheerio(this).find("h2").text();
let image = loadedCheerio(this).find("img"); return novels;
const novelCover = image.attr("data-src") || image.attr("src"); }
const novelUrl = loadedCheerio(this).find("h2 a").attr("href"); async fetchImage(url: string): Promise<string | undefined> {
return await fetchFile(url);
if (!novelUrl) return; }
filters = {
novels.push({ order: {
name: novelName, label: "ترتيب حسب",
url: novelUrl, options: [
cover: novelCover, { label: "الإعداد الأولي", value: "" },
});
}); { label: "A-Z", value: "title" },
return novels; { label: "Z-A", value: "titlereverse" },
}
async fetchImage(url: string): Promise<string | undefined> { { label: "أخر التحديثات", value: "update" },
return await fetchFile(url);
} { label: "أخر ما تم إضافته", value: "latest" },
filters = {
order: { { label: "الرائجة", value: "popular" },
label: "ترتيب حسب", ],
options: [ value: "",
{ label: "الإعداد الأولي", value: "" }, type: FilterTypes.Picker,
},
{ label: "A-Z", value: "title" }, status: {
value: "",
{ label: "Z-A", value: "titlereverse" }, label: "الحالة",
options: [
{ label: "أخر التحديثات", value: "update" }, { label: "All", value: "" },
{ label: "أخر ما تم إضافته", value: "latest" }, { label: "Ongoing", value: "ongoing" },
{ label: "الرائجة", value: "popular" }, { label: "Hiatus", value: "hiatus" },
],
value: "", { label: "Completed", value: "completed" },
type: FilterTypes.Picker, ],
}, type: FilterTypes.Picker,
status: { },
value: "", type: {
label: "الحالة", value: [],
options: [ label: "النوع",
{ label: "All", value: "" }, options: [
{ label: "إنجليزية", value: "english" },
{ label: "Ongoing", value: "ongoing" },
{ label: "روايةلايت", value: "light-novel" },
{ label: "Hiatus", value: "hiatus" },
{ label: "روايةويب", value: "web-novel" },
{ label: "Completed", value: "completed" },
], { label: "صينية", value: "chinese" },
type: FilterTypes.Picker,
}, { label: "عربية", value: "arabic" },
type: {
value: [], { label: "كورية", value: "korean" },
label: "النوع",
options: [ { label: "يابانية", value: "japanese" },
{ label: "إنجليزية", value: "english" }, ],
type: FilterTypes.CheckboxGroup,
{ label: "روايةلايت", value: "light-novel" }, },
genres: {
{ label: "روايةويب", value: "web-novel" }, value: [],
label: "تصنيف",
{ label: "صينية", value: "chinese" }, options: [
{ label: "Wuxia", value: "wuxia" },
{ label: "عربية", value: "arabic" },
{ label: "Xianxia", value: "xianxia" },
{ label: "كورية", value: "korean" },
{ label: "XUANHUAN", value: "xuanhuan" },
{ label: "يابانية", value: "japanese" },
], { label: "أكشن", value: "action" },
type: FilterTypes.CheckboxGroup,
}, { label: "إثارة", value: "excitement" },
genres: {
value: [], { label: "إنتقالالىعالمأخر", value: "isekai" },
label: "تصنيف",
options: [ { label: "إيتشي", value: "etchi" },
{ label: "Wuxia", value: "wuxia" },
{ label: "الخيالالعلمي", value: "sci-fi" },
{ label: "Xianxia", value: "xianxia" },
{ label: "بوليسي", value: "policy" },
{ label: "XUANHUAN", value: "xuanhuan" },
{ label: "تاريخي", value: "historical" },
{ label: "أكشن", value: "action" },
{ label: "تحقيقات", value: "%d8%aa%d8%ad%d9%82%d9%8a%d9%82" },
{ label: "إثارة", value: "excitement" },
{ label: "تقمصشخصيات", value: "rpg" },
{ label: "إنتقالالىعالمأخر", value: "isekai" },
{ label: "جريمة", value: "crime" },
{ label: "إيتشي", value: "etchi" },
{ label: "جوسى", value: "josei" },
{ label: "الخيالالعلمي", value: "sci-fi" },
{ label: "حريم", value: "harem" },
{ label: "بوليسي", value: "policy" },
{ label: "حياةمدرسية", value: "school-life" },
{ label: "تاريخي", value: "historical" },
{ label: "خيالي(فانتازيا)", value: "fantasy" },
{ label: "تحقيقات", value: "%d8%aa%d8%ad%d9%82%d9%8a%d9%82" },
{ label: "دراما", value: "drama" },
{ label: "تقمصشخصيات", value: "rpg" },
{ label: "رعب", value: "horror" },
{ label: "جريمة", value: "crime" },
{ label: "رومانسي", value: "romantic" },
{ label: "جوسى", value: "josei" },
{ label: "سحر", value: "magic" },
{ label: "حريم", value: "harem" },
{ label: "سينن", value: "senen" },
{ label: "حياةمدرسية", value: "school-life" },
{ label: "شريحةمنالحياة", value: "slice-of-life" },
{ label: "خيالي(فانتازيا)", value: "fantasy" },
{ label: "شوجو", value: "shojo" },
{ label: "دراما", value: "drama" },
{ label: "شونين", value: "shonen" },
{ label: "رعب", value: "horror" },
{ label: "طبي", value: "medical" },
{ label: "رومانسي", value: "romantic" },
{ label: "ظواهرخارقةللطبيعة", value: "supernatural" },
{ label: "سحر", value: "magic" },
{ label: "غموض", value: "mysteries" },
{ label: "سينن", value: "senen" },
{ label: "فنونالقتال", value: "martial-arts" },
{ label: "شريحةمنالحياة", value: "slice-of-life" },
{ label: "قوىخارقة", value: "superpower" },
{ label: "شوجو", value: "shojo" },
{ label: "كوميدي", value: "comedy" },
{ label: "شونين", value: "shonen" },
{ label: "مأساوي", value: "tragedy" },
{ label: "طبي", value: "medical" },
{ label: "مابعدالكارثة", value: "after-the-disaster" },
{ label: "ظواهرخارقةللطبيعة", value: "supernatural" },
{ label: "مغامرة", value: "adventure" },
{ label: "غموض", value: "mysteries" },
{ label: "ميكا", value: "mechanical" },
{ label: "فنونالقتال", value: "martial-arts" },
{ label: "ناضج", value: "mature" },
{ label: "قوىخارقة", value: "superpower" },
{ label: "نفسي", value: "psychological" },
{ label: "كوميدي", value: "comedy" }, ],
type: FilterTypes.CheckboxGroup,
{ label: "مأساوي", value: "tragedy" }, },
} satisfies Filters;
{ label: "مابعدالكارثة", value: "after-the-disaster" }, }
{ label: "مغامرة", value: "adventure" }, export default new KolNovel();
{ 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 { load as cheerioload } from "cheerio";
import { Plugin } from "@typings/plugin"; import { Plugin } from "@typings/plugin";
import { defaultCover } from "@libs/defaultCover"; import { defaultCover } from "@libs/defaultCover";
import { fetchFile } from "@libs/fetch"; import { fetchFile } from "@libs/fetch";
import { NovelStatus } from "@libs/novelStatus"; import { NovelStatus } from "@libs/novelStatus";
class BLN implements Plugin.PluginBase { class BLN implements Plugin.PluginBase {
id = "BLN.com"; id = "BLN.com";
name = "BestLightNovel"; name = "BestLightNovel";
icon = "src/en/bestlightnovel/icon.png"; icon = "src/en/bestlightnovel/icon.png";
site = "https://bestlightnovel.com/"; site = "https://bestlightnovel.com/";
filter?: undefined; filter?: undefined;
version = "1.0.0"; version = "1.0.0";
userAgent = ""; userAgent = "";
cookieString = ""; async popularNovels(
async popularNovels( pageNo: number,
pageNo: number, options: Plugin.PopularNovelsOptions
options: Plugin.PopularNovelsOptions ): Promise<Plugin.NovelItem[]> {
): Promise<Plugin.NovelItem[]> { const url =
const url = this.site +
this.site + "novel_list?type=topview&category=all&state=all&page=1" +
"novel_list?type=topview&category=all&state=all&page=1" + pageNo;
pageNo;
const result = await fetch(url);
const result = await fetch(url); if (!result.ok) {
if (!result.ok) { console.error(await result.text());
console.error(await result.text()); // TODO: Cloudflare protection or other error
// TODO: Cloudflare protection or other error return [];
return []; }
} const body = await result.text();
const body = await result.text();
const loadedCheerio = cheerioload(body);
const loadedCheerio = cheerioload(body);
let novels: Plugin.NovelItem[] = [];
let novels: Plugin.NovelItem[] = [];
loadedCheerio(".update_item.list_category").each(function () {
loadedCheerio(".update_item.list_category").each(function () { const novelName = loadedCheerio(this).find("h3 > a").text();
const novelName = loadedCheerio(this).find("h3 > a").text(); const novelCover = loadedCheerio(this).find("img").attr("src");
const novelCover = loadedCheerio(this).find("img").attr("src"); const novelUrl = loadedCheerio(this).find("h3 > a").attr("href");
const novelUrl = loadedCheerio(this).find("h3 > a").attr("href");
if (!novelUrl) {
if (!novelUrl) { // TODO: Handle error
// TODO: Handle error console.error("No novel url!");
console.error("No novel url!"); return;
return; }
}
const novel = {
const novel = { name: novelName,
name: novelName, url: novelUrl,
url: novelUrl, cover: novelCover,
cover: novelCover, };
};
novels.push(novel);
novels.push(novel); });
});
return novels;
return novels; }
} async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> {
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> { const url = novelUrl;
const url = novelUrl;
const result = await fetch(url);
const result = await fetch(url); if (!result.ok) {
if (!result.ok) { console.error(await result.text());
console.error(await result.text()); // TODO: Cloudflare protection
// TODO: Cloudflare protection return { url, chapters: [] };
return { url, chapters: [] }; }
} const body = await result.text();
const body = await result.text();
let loadedCheerio = cheerioload(body);
let loadedCheerio = cheerioload(body);
let novel: Plugin.SourceNovel = {
let novel: Plugin.SourceNovel = { url,
url, name: "",
name: "", cover: "",
cover: "", author: "",
author: "", status: NovelStatus.Unknown,
status: NovelStatus.Unknown, genres: "",
genres: "", summary: "",
summary: "", chapters: [],
chapters: [], };
};
novel.name = loadedCheerio(".truyen_info_right h1").text().trim();
novel.name = loadedCheerio(".truyen_info_right h1").text().trim(); novel.cover =
novel.cover = loadedCheerio(".info_image img").attr("src") || defaultCover;
loadedCheerio(".info_image img").attr("src") || defaultCover; novel.summary = loadedCheerio("#noidungm").text()?.trim();
novel.summary = loadedCheerio("#noidungm").text()?.trim(); novel.author = loadedCheerio(
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"
"#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()
.text() ?.trim();
?.trim();
let status = loadedCheerio(
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"
"#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()
.text() ?.trim();
?.trim();
novel.status =
novel.status = status === "ONGOING"
status === "ONGOING" ? NovelStatus.Ongoing
? NovelStatus.Ongoing : status === "COMPLETED"
: status === "COMPLETED" ? NovelStatus.Completed
? NovelStatus.Completed : NovelStatus.Unknown;
: NovelStatus.Unknown;
let novelChapters: Plugin.ChapterItem[] = [];
let novelChapters: Plugin.ChapterItem[] = [];
loadedCheerio(".chapter-list div.row").each(function () {
loadedCheerio(".chapter-list div.row").each(function () { const chapterName = loadedCheerio(this).find("a").text().trim();
const chapterName = loadedCheerio(this).find("a").text().trim(); const releaseDate = loadedCheerio(this)
const releaseDate = loadedCheerio(this) .find("span:nth-child(2)")
.find("span:nth-child(2)") .text()
.text() .trim();
.trim(); const chapterUrl = loadedCheerio(this).find("a").attr("href");
const chapterUrl = loadedCheerio(this).find("a").attr("href");
if (!chapterUrl) {
if (!chapterUrl) { // TODO: Handle error
// TODO: Handle error console.error("No chapter url!");
console.error("No chapter url!"); return;
return; }
}
novelChapters.push({
novelChapters.push({ name: chapterName,
name: chapterName, releaseTime: releaseDate,
releaseTime: releaseDate, url: chapterUrl,
url: chapterUrl, });
}); });
});
novel.chapters = novelChapters.reverse();
novel.chapters = novelChapters.reverse();
return novel;
return novel; }
} async parseChapter(chapterUrl: string): Promise<string> {
async parseChapter(chapterUrl: string): Promise<string> { const url = chapterUrl;
const url = chapterUrl;
const result = await fetch(url);
const result = await fetch(url); const body = await result.text();
const body = await result.text();
let loadedCheerio = cheerioload(body);
let loadedCheerio = cheerioload(body);
const chapterText = loadedCheerio("#vung_doc").html() || "";
const chapterText = loadedCheerio("#vung_doc").html() || "";
return chapterText;
return chapterText; }
} async searchNovels(
async searchNovels( searchTerm: string,
searchTerm: string, pageNo?: number | undefined
pageNo?: number | undefined ): Promise<Plugin.NovelItem[]> {
): Promise<Plugin.NovelItem[]> { const url = `${this.site}search_novels/${searchTerm}`;
const url = `${this.site}search_novels/${searchTerm}`;
const result = await fetch(url);
const result = await fetch(url); const body = await result.text();
const body = await result.text();
let loadedCheerio = cheerioload(body);
let loadedCheerio = cheerioload(body);
let novels: Plugin.NovelItem[] = [];
let novels: Plugin.NovelItem[] = [];
loadedCheerio(".update_item.list_category").each(function () {
loadedCheerio(".update_item.list_category").each(function () { const novelName = loadedCheerio(this).find("h3 > a").text();
const novelName = loadedCheerio(this).find("h3 > a").text(); const novelCover = loadedCheerio(this).find("img").attr("src");
const novelCover = loadedCheerio(this).find("img").attr("src"); const novelUrl = loadedCheerio(this).find("h3 > a").attr("href");
const novelUrl = loadedCheerio(this).find("h3 > a").attr("href");
if (!novelUrl) {
if (!novelUrl) { // TODO: Handle error
// TODO: Handle error console.error("No novel url!");
console.error("No novel url!"); return;
return; }
}
const novel = { name: novelName, cover: novelCover, url: novelUrl };
const novel = { name: novelName, cover: novelCover, url: novelUrl };
novels.push(novel);
novels.push(novel); });
});
return novels;
return novels; }
} async fetchImage(url: string): Promise<string | undefined> {
async fetchImage(url: string): Promise<string | undefined> { return await fetchFile(url);
return await fetchFile(url); }
} }
}
export default new BLN();
export default new BLN();
+1 -2
View File
@@ -9,8 +9,7 @@ class FTest implements Plugin.PluginBase {
icon = "src/en/noblemtl/icon.png"; icon = "src/en/noblemtl/icon.png";
site = "https://noblemtl.com/"; site = "https://noblemtl.com/";
version = "1.0.0"; version = "1.0.0";
userAgent = ""; userAgent = "";
cookieString = "";
async popularNovels( async popularNovels(
pageNo: number, pageNo: number,
{ filters }: Plugin.PopularNovelsOptions<typeof this.filters> { filters }: Plugin.PopularNovelsOptions<typeof this.filters>
+103 -104
View File
@@ -1,104 +1,103 @@
import { Plugin } from "@typings/plugin"; import { Plugin } from "@typings/plugin";
import { fetchApi, fetchFile } from "@libs/fetch"; import { fetchApi, fetchFile } from "@libs/fetch";
import { NovelStatus } from "@libs/novelStatus"; import { NovelStatus } from "@libs/novelStatus";
import { load as parseHTML } from "cheerio"; import { load as parseHTML } from "cheerio";
class FreeWebNovel implements Plugin.PluginBase { class FreeWebNovel implements Plugin.PluginBase {
id = "FWN.com"; id = "FWN.com";
name = "Web NOVEL"; name = "Web NOVEL";
site = "https://freewebnovel.com"; site = "https://freewebnovel.com";
version = "1.0.0"; version = "1.0.0";
icon = "src/en/freewebnovel/icon.png"; icon = "src/en/freewebnovel/icon.png";
userAgent = ""; userAgent = "";
cookieString = "";
async popularNovels(
async popularNovels( page: number,
page: number, { showLatestNovels }: Plugin.PopularNovelsOptions,
{ showLatestNovels }: Plugin.PopularNovelsOptions, ): Promise<Plugin.NovelItem[]> {
): Promise<Plugin.NovelItem[]> { const sort = showLatestNovels
const sort = showLatestNovels ? "/latest-release-novels/"
? "/latest-release-novels/" : "/completed-novels/";
: "/completed-novels/";
const body = await fetchApi(this.site + sort + page).then((res) => res.text());
const body = await fetchApi(this.site + sort + page).then((res) => res.text()); const loadedCheerio = parseHTML(body);
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = loadedCheerio(".li-row")
const novels: Plugin.NovelItem[] = loadedCheerio(".li-row") .map((index, element) => ({
.map((index, element) => ({ name: loadedCheerio(element).find(".tit").text(),
name: loadedCheerio(element).find(".tit").text(), cover: loadedCheerio(element).find("img").attr("src"),
cover: loadedCheerio(element).find("img").attr("src"), url: this.site + loadedCheerio(element).find("h3 > a").attr("href"),
url: this.site + loadedCheerio(element).find("h3 > a").attr("href"), }))
})) .get();
.get();
return novels;
return novels; }
}
async parseNovelAndChapters(url: string): Promise<Plugin.SourceNovel> {
async parseNovelAndChapters(url: string): Promise<Plugin.SourceNovel> { const body = await fetchApi(url).then((res) => res.text());
const body = await fetchApi(url).then((res) => res.text()); const loadedCheerio = parseHTML(body);
const loadedCheerio = parseHTML(body);
const novel: Plugin.SourceNovel = { url };
const novel: Plugin.SourceNovel = { url }; novel.name = loadedCheerio("h1.tit").text();
novel.name = loadedCheerio("h1.tit").text(); novel.cover = loadedCheerio(".pic > img").attr("src");
novel.cover = loadedCheerio(".pic > img").attr("src"); novel.genres = loadedCheerio("[title=Genre]")
novel.genres = loadedCheerio("[title=Genre]") .next()
.next() .text()
.text() .replace(/[\t\n]/g, "");
.replace(/[\t\n]/g, "");
novel.author = loadedCheerio("[title=Author]")
novel.author = loadedCheerio("[title=Author]") .next()
.next() .text()
.text() .replace(/[\t\n]/g, "");
.replace(/[\t\n]/g, "");
novel.status = loadedCheerio("[title=Status]")
novel.status = loadedCheerio("[title=Status]") .next()
.next() .text()
.text() .replace(/[\t\n]/g, "");
.replace(/[\t\n]/g, "");
novel.summary = loadedCheerio(".inner").text().trim();
novel.summary = loadedCheerio(".inner").text().trim();
const chapters: Plugin.ChapterItem[] = loadedCheerio("#idData > li > a")
const chapters: Plugin.ChapterItem[] = loadedCheerio("#idData > li > a") .map((index, element) => ({
.map((index, element) => ({ name: loadedCheerio(element).attr("title") || "Chapter " + index,
name: loadedCheerio(element).attr("title") || "Chapter " + index, releaseTime: null,
releaseTime: null, url: this.site + loadedCheerio(element).attr("href"),
url: this.site + loadedCheerio(element).attr("href"), }))
})) .get();
.get();
novel.chapters = chapters;
novel.chapters = chapters; return novel;
return novel; }
}
async parseChapter(chapterUrl: string): Promise<string> {
async parseChapter(chapterUrl: string): Promise<string> { const body = await fetchApi(chapterUrl).then((res) => res.text());
const body = await fetchApi(chapterUrl).then((res) => res.text()); const loadedCheerio = parseHTML(body);
const loadedCheerio = parseHTML(body);
const chapterText = loadedCheerio("div.txt").html() || "";
const chapterText = loadedCheerio("div.txt").html() || ""; return chapterText;
return chapterText; }
}
async searchNovels(
async searchNovels( searchkey: string,
searchkey: string, ): Promise<Plugin.NovelItem[]> {
): Promise<Plugin.NovelItem[]> { const body = await fetchApi(this.site + "/search/", {
const body = await fetchApi(this.site + "/search/", { method: "POST",
method: "POST", body: JSON.stringify({ searchkey }),
body: JSON.stringify({ searchkey }), }).then((res) => res.text());
}).then((res) => res.text());
const loadedCheerio = parseHTML(body);
const loadedCheerio = parseHTML(body); const novels: Plugin.NovelItem[] = loadedCheerio(".li-row > .li > .con")
const novels: Plugin.NovelItem[] = loadedCheerio(".li-row > .li > .con") .map((index, element) => ({
.map((index, element) => ({ name: loadedCheerio(element).find(".tit").text(),
name: loadedCheerio(element).find(".tit").text(), cover: loadedCheerio(element).find(".pic > a > img").attr("data-cfsrc"),
cover: loadedCheerio(element).find(".pic > a > img").attr("data-cfsrc"), url: this.site + loadedCheerio(element).find("h3 > a").attr("href"),
url: this.site + loadedCheerio(element).find("h3 > a").attr("href"), }))
})) .get();
.get();
return novels;
return novels; }
}
fetchImage = fetchFile;
fetchImage = fetchFile; }
}
export default new FreeWebNovel();
export default new FreeWebNovel();
+415 -428
View File
@@ -1,428 +1,415 @@
import { load as parseHTML } from "cheerio"; import { load as parseHTML } from "cheerio";
import { fetchApi, fetchFile } from "@libs/fetch"; import { fetchApi, fetchFile } from "@libs/fetch";
import { FilterTypes, Filters } from "@libs/filterInputs"; import { FilterTypes, Filters } from "@libs/filterInputs";
import { Plugin } from "@typings/plugin"; import { Plugin } from "@typings/plugin";
class NobleMTL implements Plugin.PluginBase { class NobleMTL implements Plugin.PluginBase {
id = "noblemtl"; id = "noblemtl";
name = "NobleMTL"; name = "NobleMTL";
icon = "src/en/noblemtl/icon.png"; icon = "src/en/noblemtl/icon.png";
site = "https://noblemtl.com/"; site = "https://noblemtl.com/";
version = "1.0.0"; version = "1.0.0";
userAgent = ""; userAgent = "";
cookieString = ""; async popularNovels(
async popularNovels( pageNo: number,
pageNo: number, { filters }: Plugin.PopularNovelsOptions<typeof this.filters>
{ filters }: Plugin.PopularNovelsOptions<typeof this.filters> ): Promise<Plugin.NovelItem[]> {
): Promise<Plugin.NovelItem[]> { let link = `${this.site}series/?page=${pageNo}`;
let link = `${this.site}series/?page=${pageNo}`;
if (filters.genres.value.length)
if (filters.genres.value.length) link += filters.genres.value.map((i) => `&genre[]=${i}`).join("");
link += filters.genres.value.map((i) => `&genre[]=${i}`).join("");
if (filters.type.value.length)
if (filters.type.value.length) link += filters.type.value.map((i) => `&lang[]=${i}`).join("");
link += filters.type.value.map((i) => `&lang[]=${i}`).join("");
link += "&status=" + filters.status.value;
link += "&status=" + filters.status.value;
link += "&order=" + filters.order.value;
link += "&order=" + filters.order.value;
const headers = new Headers();
const headers = new Headers(); const body = await fetchApi(link, { headers }).then((result) =>
if (this.cookieString) { result.text()
headers.append("cookie", this.cookieString); );
}
const body = await fetchApi(link, { headers }).then((result) => const loadedCheerio = parseHTML(body);
result.text()
); const novels: Plugin.NovelItem[] = [];
const loadedCheerio = parseHTML(body); loadedCheerio("article.bs").each(function () {
const novelName = loadedCheerio(this).find(".ntitle").text().trim();
const novels: Plugin.NovelItem[] = []; let image = loadedCheerio(this).find("img");
const novelCover = image.attr("data-src") || image.attr("src");
loadedCheerio("article.bs").each(function () {
const novelName = loadedCheerio(this).find(".ntitle").text().trim(); const novelUrl = loadedCheerio(this).find("a").attr("href");
let image = loadedCheerio(this).find("img");
const novelCover = image.attr("data-src") || image.attr("src"); if (!novelUrl) return;
const novelUrl = loadedCheerio(this).find("a").attr("href"); const novel = {
name: novelName,
if (!novelUrl) return; cover: novelCover,
url: novelUrl,
const novel = { };
name: novelName,
cover: novelCover, novels.push(novel);
url: novelUrl, });
};
return novels;
novels.push(novel); }
});
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> {
return novels; const url = novelUrl;
} const headers = new Headers();
const result = await fetchApi(url, { headers });
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> { const body = await result.text();
const url = novelUrl;
const headers = new Headers(); let loadedCheerio = parseHTML(body);
if (this.cookieString) {
headers.append("cookie", this.cookieString); const novel: Plugin.SourceNovel = {
} url,
const result = await fetchApi(url, { headers }); chapters: [],
const body = await result.text(); };
let loadedCheerio = parseHTML(body); novel.name = loadedCheerio(".entry-title").text();
const novel: Plugin.SourceNovel = { novel.cover =
url, loadedCheerio("img.wp-post-image").attr("data-src") ||
chapters: [], loadedCheerio("img.wp-post-image").attr("src");
};
loadedCheerio("div.spe > span").each(function () {
novel.name = loadedCheerio(".entry-title").text(); const detailName = loadedCheerio(this).find("b").text().trim();
const detail = loadedCheerio(this)
novel.cover = .find("b")
loadedCheerio("img.wp-post-image").attr("data-src") || .remove()
loadedCheerio("img.wp-post-image").attr("src"); .end()
.text()
loadedCheerio("div.spe > span").each(function () { .trim();
const detailName = loadedCheerio(this).find("b").text().trim();
const detail = loadedCheerio(this) switch (detailName) {
.find("b") case "Author:":
.remove() novel.author = detail;
.end() break;
.text() case "Status:":
.trim(); novel.status = detail;
break;
switch (detailName) { }
case "Author:": });
novel.author = detail;
break; novel.genres = loadedCheerio(".genxed")
case "Status:": .text()
novel.status = detail; .trim()
break; .replace(/\s/g, ",");
}
}); loadedCheerio('div[itemprop="description"] h3,p.a,strong').remove();
novel.summary = loadedCheerio('div[itemprop="description"]')
novel.genres = loadedCheerio(".genxed") .find("br")
.text() .replaceWith("\n")
.trim() .end()
.replace(/\s/g, ","); .text();
loadedCheerio('div[itemprop="description"] h3,p.a,strong').remove(); let chapter: Plugin.ChapterItem[] = [];
novel.summary = loadedCheerio('div[itemprop="description"]')
.find("br") loadedCheerio(".eplister")
.replaceWith("\n") .find("li")
.end() .each(function () {
.text(); const chapterName =
loadedCheerio(this).find(".epl-num").text() +
let chapter: Plugin.ChapterItem[] = []; " - " +
loadedCheerio(this).find(".epl-title").text();
loadedCheerio(".eplister")
.find("li") const releaseDate = loadedCheerio(this)
.each(function () { .find(".epl-date")
const chapterName = .text()
loadedCheerio(this).find(".epl-num").text() + .trim();
" - " +
loadedCheerio(this).find(".epl-title").text(); const chapterUrl = loadedCheerio(this).find("a").attr("href");
const releaseDate = loadedCheerio(this) if (!chapterUrl) return;
.find(".epl-date")
.text() chapter.push({
.trim(); name: chapterName,
releaseTime: releaseDate,
const chapterUrl = loadedCheerio(this).find("a").attr("href"); url: chapterUrl,
});
if (!chapterUrl) return; });
chapter.push({ novel.chapters = chapter.reverse();
name: chapterName,
releaseTime: releaseDate, return novel;
url: chapterUrl, }
}); async parseChapter(chapterUrl: string): Promise<string> {
}); const headers = new Headers();
const result = await fetchApi(chapterUrl, { headers });
novel.chapters = chapter.reverse(); const body = await result.text();
return novel; const loadedCheerio = parseHTML(body);
}
async parseChapter(chapterUrl: string): Promise<string> { let chapterText = loadedCheerio(".epcontent").html() || "";
const headers = new Headers();
if (this.cookieString) { return chapterText;
headers.append("cookie", this.cookieString); }
}
const result = await fetchApi(chapterUrl, { headers }); async searchNovels(
const body = await result.text(); searchTerm: string,
pageNo?: number | undefined
const loadedCheerio = parseHTML(body); ): Promise<Plugin.NovelItem[]> {
const url = `${this.site}?s=${searchTerm}`;
let chapterText = loadedCheerio(".epcontent").html() || ""; const headers = new Headers();
const result = await fetchApi(url, { headers });
return chapterText; const body = await result.text();
}
const loadedCheerio = parseHTML(body);
async searchNovels(
searchTerm: string, const novels: Plugin.NovelItem[] = [];
pageNo?: number | undefined
): Promise<Plugin.NovelItem[]> { loadedCheerio("article.bs").each(function () {
const url = `${this.site}?s=${searchTerm}`; const novelName = loadedCheerio(this).find(".ntitle").text().trim();
const headers = new Headers(); const novelCover = loadedCheerio(this).find("img").attr("src");
if (this.cookieString) { const novelUrl = loadedCheerio(this).find("a").attr("href");
headers.append("cookie", this.cookieString); if (!novelUrl) return;
}
const result = await fetchApi(url, { headers }); novels.push({
const body = await result.text(); name: novelName,
url: novelUrl,
const loadedCheerio = parseHTML(body); cover: novelCover,
});
const novels: Plugin.NovelItem[] = []; });
loadedCheerio("article.bs").each(function () { return novels;
const novelName = loadedCheerio(this).find(".ntitle").text().trim(); }
const novelCover = loadedCheerio(this).find("img").attr("src"); async fetchImage(url: string): Promise<string | undefined> {
const novelUrl = loadedCheerio(this).find("a").attr("href"); return await fetchFile(url);
if (!novelUrl) return; }
novels.push({ filters = {
name: novelName, order: {
url: novelUrl, label: "Sort By",
cover: novelCover, type: FilterTypes.Picker,
}); options: [
}); { label: "Default", value: "" },
return novels; { label: "A-Z", value: "title" },
}
async fetchImage(url: string): Promise<string | undefined> { { label: "Z-A", value: "titlereverse" },
return await fetchFile(url);
} { label: "Latest Update", value: "update" },
filters = { { label: "Latest Added", value: "latest" },
order: {
label: "Sort By", { label: "Popular", value: "popular" },
type: FilterTypes.Picker, ],
options: [ value: "",
{ label: "Default", value: "" }, },
{ label: "A-Z", value: "title" }, status: {
label: "Status",
{ label: "Z-A", value: "titlereverse" }, options: [
{ label: "All", value: "" },
{ label: "Latest Update", value: "update" },
{ label: "Ongoing", value: "ongoing" },
{ label: "Latest Added", value: "latest" },
{ label: "Hiatus", value: "hiatus" },
{ label: "Popular", value: "popular" },
], { label: "Completed", value: "completed" },
value: "", ],
}, type: FilterTypes.Picker,
value: "",
status: { },
label: "Status", type: {
options: [ label: "Type",
{ label: "All", value: "" }, options: [
{ label: "Chinese novel", value: "chinese-novel" },
{ label: "Ongoing", value: "ongoing" },
{ label: "habyeol", value: "habyeol" },
{ label: "Hiatus", value: "hiatus" },
{ label: "korean novel", value: "korean-novel" },
{ label: "Completed", value: "completed" },
], { label: "Web Novel", value: "web-novel" },
type: FilterTypes.Picker,
value: "", { label: "삼심", value: "%ec%82%bc%ec%8b%ac" },
},
type: { { label: "호곡", value: "%ed%98%b8%ea%b3%a1" },
label: "Type", ],
options: [ type: FilterTypes.CheckboxGroup,
{ label: "Chinese novel", value: "chinese-novel" }, value: [],
},
{ label: "habyeol", value: "habyeol" }, genres: {
label: "Genres",
{ label: "korean novel", value: "korean-novel" }, value: [],
options: [
{ label: "Web Novel", value: "web-novel" }, { label: "A.I", value: "a.i" },
{ label: "삼심", value: "%ec%82%bc%ec%8b%ac" }, { label: "Academy", value: "academy" },
{ label: "호곡", value: "%ed%98%b8%ea%b3%a1" }, { label: "Action", value: "action" },
],
type: FilterTypes.CheckboxGroup, { label: "Adult", value: "adult" },
value: [],
}, { label: "Adventure", value: "adventure" },
genres: {
label: "Genres", { label: "Alternative History", value: "alternative-history" },
value: [],
options: [ { label: "Another World", value: "another-world" },
{ label: "A.I", value: "a.i" },
{ label: "Apocalypse", value: "apocalypse" },
{ label: "Academy", value: "academy" },
{ label: "Bromance", value: "bromance" },
{ label: "Action", value: "action" },
{ label: "Comedy", value: "comedy" },
{ label: "Adult", value: "adult" },
{ label: "Dark fantasy", value: "dark-fantasy" },
{ label: "Adventure", value: "adventure" },
{ label: "Demons", value: "demons" },
{ label: "Alternative History", value: "alternative-history" },
{ label: "Drama", value: "drama" },
{ label: "Another World", value: "another-world" },
{ label: "Dystopia", value: "dystopia" },
{ label: "Apocalypse", value: "apocalypse" },
{ label: "Ecchi", value: "ecchi" },
{ label: "Bromance", value: "bromance" },
{ label: "Entertainment", value: "entertainment" },
{ label: "Comedy", value: "comedy" },
{ label: "Exhaustion", value: "exhaustion" },
{ label: "Dark fantasy", value: "dark-fantasy" },
{ label: "Fanfiction", value: "fanfiction" },
{ label: "Demons", value: "demons" },
{ label: "fantasy", value: "fantasy" },
{ label: "Drama", value: "drama" },
{ label: "finance", value: "finance" },
{ label: "Dystopia", value: "dystopia" },
{ label: "Full color", value: "full-color" },
{ label: "Ecchi", value: "ecchi" },
{ label: "Game", value: "game" },
{ label: "Entertainment", value: "entertainment" },
{ label: "Gender Bender", value: "gender-bender" },
{ label: "Exhaustion", value: "exhaustion" },
{ label: "Genius", value: "genius" },
{ label: "Fanfiction", value: "fanfiction" },
{ label: "Harem", value: "harem" },
{ label: "fantasy", value: "fantasy" },
{ label: "Hero", value: "hero" },
{ label: "finance", value: "finance" },
{ label: "Historical", value: "historical" },
{ label: "Full color", value: "full-color" },
{ label: "Hunter", value: "hunter" },
{ label: "Game", value: "game" },
{ label: "korean novel", value: "korean-novel" },
{ label: "Gender Bender", value: "gender-bender" },
{ label: "Light Novel", value: "light-novel" },
{ label: "Genius", value: "genius" },
{
{ label: "Harem", value: "harem" }, label: "List Adventure Manga Genres",
value: "list-adventure-manga-genres",
{ label: "Hero", value: "hero" }, },
{ label: "Historical", value: "historical" }, { label: "Long Strip", value: "long-strip" },
{ label: "Hunter", value: "hunter" }, { label: "Love comedy", value: "love-comedy" },
{ label: "korean novel", value: "korean-novel" }, { label: "magic", value: "magic" },
{ label: "Light Novel", value: "light-novel" }, { label: "Manhua", value: "manhua" },
{ { label: "Martial Arts", value: "martial-arts" },
label: "List Adventure Manga Genres",
value: "list-adventure-manga-genres", { label: "Mature", value: "mature" },
},
{ label: "Medieval", value: "medieval" },
{ label: "Long Strip", value: "long-strip" },
{ label: "Misunderstanding", value: "misunderstanding" },
{ label: "Love comedy", value: "love-comedy" },
{ label: "Modern", value: "modern" },
{ label: "magic", value: "magic" },
{ label: "modern fantasy", value: "modern-fantasy" },
{ label: "Manhua", value: "manhua" },
{ label: "music", value: "music" },
{ label: "Martial Arts", value: "martial-arts" },
{ label: "Mystery", value: "mystery" },
{ label: "Mature", value: "mature" },
{ label: "Necromancy", value: "necromancy" },
{ label: "Medieval", value: "medieval" },
{ label: "No Romance", value: "no-romance" },
{ label: "Misunderstanding", value: "misunderstanding" },
{ label: "NTL", value: "ntl" },
{ label: "Modern", value: "modern" },
{ label: "o", value: "o" },
{ label: "modern fantasy", value: "modern-fantasy" },
{ label: "Obsession", value: "obsession" },
{ label: "music", value: "music" },
{ label: "Politics", value: "politics" },
{ label: "Mystery", value: "mystery" },
{ label: "Possession", value: "possession" },
{ label: "Necromancy", value: "necromancy" },
{ label: "Programming", value: "programming" },
{ label: "No Romance", value: "no-romance" },
{ label: "Psychological", value: "psychological" },
{ label: "NTL", value: "ntl" },
{ label: "Pure Love", value: "pure-love" },
{ label: "o", value: "o" },
{ label: "Redemption", value: "redemption" },
{ label: "Obsession", value: "obsession" },
{ label: "Regression", value: "regression" },
{ label: "Politics", value: "politics" },
{ label: "Regret", value: "regret" },
{ label: "Possession", value: "possession" },
{ label: "Reincarnation", value: "reincarnation" },
{ label: "Programming", value: "programming" },
{ label: "Revenge", value: "revenge" },
{ label: "Psychological", value: "psychological" },
{ label: "Romance", value: "romance" },
{ label: "Pure Love", value: "pure-love" },
{ label: "Romance Fanrasy", value: "romance-fanrasy" },
{ label: "Redemption", value: "redemption" },
{ label: "Salvation", value: "salvation" },
{ label: "Regression", value: "regression" },
{ label: "School Life", value: "school-life" },
{ label: "Regret", value: "regret" },
{ label: "Sci-fi", value: "sci-fi" },
{ label: "Reincarnation", value: "reincarnation" },
{ label: "Science fiction", value: "science-fiction" },
{ label: "Revenge", value: "revenge" },
{ label: "Seinen", value: "seinen" },
{ label: "Romance", value: "romance" },
{ label: "Shounen", value: "shounen" },
{ label: "Romance Fanrasy", value: "romance-fanrasy" },
{ label: "Slice of Life", value: "slice-of-life" },
{ label: "Salvation", value: "salvation" },
{ label: "Soft yandere", value: "soft-yandere" },
{ label: "School Life", value: "school-life" },
{ label: "Sports", value: "sports" },
{ label: "Sci-fi", value: "sci-fi" },
{ label: "Supernatural", value: "supernatural" },
{ label: "Science fiction", value: "science-fiction" },
{ label: "Survival", value: "survival" },
{ label: "Seinen", value: "seinen" },
{ label: "system", value: "system" },
{ label: "Shounen", value: "shounen" },
{ label: "Time limit", value: "time-limit" },
{ label: "Slice of Life", value: "slice-of-life" },
{ label: "Tragedy", value: "tragedy" },
{ label: "Soft yandere", value: "soft-yandere" },
{ label: "Transmigration", value: "transmigration" },
{ label: "Sports", value: "sports" },
{ label: "TS", value: "ts" },
{ label: "Supernatural", value: "supernatural" },
{ label: "Tsundere", value: "tsundere" },
{ label: "Survival", value: "survival" },
{ label: "Unique", value: "unique" },
{ label: "system", value: "system" },
{ label: "Wholesome", value: "wholesome" },
{ label: "Time limit", value: "time-limit" },
{ label: "Wuxia", value: "wuxia" },
{ label: "Tragedy", value: "tragedy" },
{ label: "Xuanhuan", value: "xuanhuan" },
{ label: "Transmigration", value: "transmigration" },
{ label: "Yandere", value: "yandere" },
{ label: "TS", value: "ts" },
{ label: "Yuri", value: "yuri" },
{ label: "Tsundere", value: "tsundere" }, ],
type: FilterTypes.CheckboxGroup,
{ label: "Unique", value: "unique" }, },
} satisfies Filters;
{ label: "Wholesome", value: "wholesome" }, }
{ label: "Wuxia", value: "wuxia" }, const Noble = new NobleMTL();
{ label: "Xuanhuan", value: "xuanhuan" }, export default new NobleMTL();
{ 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 { load as parseHTML } from "cheerio";
import { fetchApi, fetchFile } from "@libs/fetch"; import { fetchApi, fetchFile } from "@libs/fetch";
import { FilterTypes, Filters } from "@libs/filterInputs"; import { FilterTypes, Filters } from "@libs/filterInputs";
import { Plugin } from "@typings/plugin"; import { Plugin } from "@typings/plugin";
class PandaMTL implements Plugin.PluginBase { class PandaMTL implements Plugin.PluginBase {
id = "pandamtl"; id = "pandamtl";
name = "PandaMTL"; name = "PandaMTL";
icon = "src/en/wordpress/icon.png"; icon = "src/en/wordpress/icon.png";
site = "https://pandamtl.com/"; site = "https://pandamtl.com/";
version = "1.0.0"; version = "1.0.0";
userAgent = ""; userAgent = "";
cookieString = ""; async popularNovels(
async popularNovels( pageNo: number,
pageNo: number, { filters }: Plugin.PopularNovelsOptions<typeof this.filters>
{ filters }: Plugin.PopularNovelsOptions<typeof this.filters> ): Promise<Plugin.NovelItem[]> {
): Promise<Plugin.NovelItem[]> { let link = `${this.site}series/?page=${pageNo}`;
let link = `${this.site}series/?page=${pageNo}`;
if (filters.genres.value.length) {
if (filters.genres.value.length) { link += filters.genres.value.map((i) => `&genre[]=${i}`).join("");
link += filters.genres.value.map((i) => `&genre[]=${i}`).join(""); }
}
if (filters.type.value.length)
if (filters.type.value.length) link += filters.type.value.map((i) => `&lang[]=${i}`).join("");
link += filters.type.value.map((i) => `&lang[]=${i}`).join("");
link += "&status=" + (filters?.status ? filters.status : "");
link += "&status=" + (filters?.status ? filters.status : "");
link += "&order=" + (filters?.order ? filters.order : "popular");
link += "&order=" + (filters?.order ? filters.order : "popular");
const headers = new Headers();
const headers = new Headers(); const body = await fetchApi(link, { headers }).then((result) =>
if (this.cookieString) { result.text()
headers.append("cookie", this.cookieString); );
}
const body = await fetchApi(link, { headers }).then((result) => const loadedCheerio = parseHTML(body);
result.text()
); const novels: Plugin.NovelItem[] = [];
const loadedCheerio = parseHTML(body); loadedCheerio("article.maindet").each(function () {
const novelName = loadedCheerio(this).find("h2").text();
const novels: Plugin.NovelItem[] = []; let image = loadedCheerio(this).find("img");
const novelCover = image.attr("data-src") || image.attr("src");
loadedCheerio("article.maindet").each(function () { const novelUrl = loadedCheerio(this).find("h2 a").attr("href");
const novelName = loadedCheerio(this).find("h2").text();
let image = loadedCheerio(this).find("img"); if (!novelUrl) return;
const novelCover = image.attr("data-src") || image.attr("src");
const novelUrl = loadedCheerio(this).find("h2 a").attr("href"); const novel = {
name: novelName,
if (!novelUrl) return; cover: novelCover,
url: novelUrl,
const novel = { };
name: novelName,
cover: novelCover, novels.push(novel);
url: novelUrl, });
};
return novels;
novels.push(novel); }
}); async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> {
const url = novelUrl;
return novels; const headers = new Headers();
} const result = await fetchApi(url, { headers });
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> { const body = await result.text();
const url = novelUrl;
const headers = new Headers(); let loadedCheerio = parseHTML(body);
if (this.cookieString) {
headers.append("cookie", this.cookieString); const novel: Plugin.SourceNovel = {
} url,
const result = await fetchApi(url, { headers }); chapters: [],
const body = await result.text(); };
let loadedCheerio = parseHTML(body); novel.name = loadedCheerio("h1.entry-title").text();
const novel: Plugin.SourceNovel = { novel.cover =
url, loadedCheerio("img.wp-post-image").attr("data-src") ||
chapters: [], loadedCheerio("img.wp-post-image").attr("src");
};
loadedCheerio(".serl:nth-child(3) > span").each(function () {
novel.name = loadedCheerio("h1.entry-title").text(); const detailName = loadedCheerio(this).text().trim();
const detail = loadedCheerio(this).next().text().trim();
novel.cover =
loadedCheerio("img.wp-post-image").attr("data-src") || switch (detailName) {
loadedCheerio("img.wp-post-image").attr("src"); case "Author":
novel.author = detail;
loadedCheerio(".serl:nth-child(3) > span").each(function () { break;
const detailName = loadedCheerio(this).text().trim(); }
const detail = loadedCheerio(this).next().text().trim(); });
switch (detailName) { novel.status = loadedCheerio(".sertostat > span").attr("class");
case "Author":
novel.author = detail; novel.genres = loadedCheerio(".sertogenre")
break; .children("a")
} .map((i, el) => loadedCheerio(el).text())
}); .toArray()
.join(",");
novel.status = loadedCheerio(".sertostat > span").attr("class");
novel.summary = loadedCheerio(".sersys")
novel.genres = loadedCheerio(".sertogenre") .find("br")
.children("a") .replaceWith("\n")
.map((i, el) => loadedCheerio(el).text()) .end()
.toArray() .text();
.join(",");
let chapter: Plugin.ChapterItem[] = [];
novel.summary = loadedCheerio(".sersys")
.find("br") loadedCheerio(".eplister")
.replaceWith("\n") .find("li")
.end() .each(function () {
.text(); const chapterName =
loadedCheerio(this).find(".epl-num").text() +
let chapter: Plugin.ChapterItem[] = []; " - " +
loadedCheerio(this).find(".epl-title").text();
loadedCheerio(".eplister")
.find("li") const releaseDate = loadedCheerio(this)
.each(function () { .find(".epl-date")
const chapterName = .text()
loadedCheerio(this).find(".epl-num").text() + .trim();
" - " +
loadedCheerio(this).find(".epl-title").text(); const chapterUrl = loadedCheerio(this).find("a").attr("href");
const releaseDate = loadedCheerio(this) if (!chapterUrl) return;
.find(".epl-date")
.text() chapter.push({
.trim(); name: chapterName,
releaseTime: releaseDate,
const chapterUrl = loadedCheerio(this).find("a").attr("href"); url: chapterUrl,
});
if (!chapterUrl) return; });
chapter.push({ novel.chapters = chapter.reverse();
name: chapterName,
releaseTime: releaseDate, return novel;
url: chapterUrl, }
}); async parseChapter(chapterUrl: string): Promise<string> {
}); const headers = new Headers();
const result = await fetchApi(chapterUrl, { headers });
novel.chapters = chapter.reverse(); const body = await result.text();
return novel; const loadedCheerio = parseHTML(body);
}
async parseChapter(chapterUrl: string): Promise<string> { let chapterText = loadedCheerio(".epcontent").html() || "";
const headers = new Headers();
if (this.cookieString) { return chapterText;
headers.append("cookie", this.cookieString); }
} async searchNovels(
const result = await fetchApi(chapterUrl, { headers }); searchTerm: string,
const body = await result.text(); pageNo?: number | undefined
): Promise<Plugin.NovelItem[]> {
const loadedCheerio = parseHTML(body); const url = `${this.site}?s=${searchTerm}`;
const headers = new Headers();
let chapterText = loadedCheerio(".epcontent").html() || ""; const result = await fetchApi(url, { headers });
const body = await result.text();
return chapterText;
} const loadedCheerio = parseHTML(body);
async searchNovels(
searchTerm: string, const novels: Plugin.NovelItem[] = [];
pageNo?: number | undefined
): Promise<Plugin.NovelItem[]> { loadedCheerio("article.maindet").each(function () {
const url = `${this.site}?s=${searchTerm}`; const novelName = loadedCheerio(this).find("h2").text();
const headers = new Headers(); let image = loadedCheerio(this).find("img");
if (this.cookieString) { const novelCover = image.attr("data-src") || image.attr("src");
headers.append("cookie", this.cookieString); const novelUrl = loadedCheerio(this).find("h2 a").attr("href");
}
const result = await fetchApi(url, { headers }); if (!novelUrl) return;
const body = await result.text();
novels.push({
const loadedCheerio = parseHTML(body); name: novelName,
url: novelUrl,
const novels: Plugin.NovelItem[] = []; cover: novelCover,
});
loadedCheerio("article.maindet").each(function () { });
const novelName = loadedCheerio(this).find("h2").text();
let image = loadedCheerio(this).find("img"); return novels;
const novelCover = image.attr("data-src") || image.attr("src"); }
const novelUrl = loadedCheerio(this).find("h2 a").attr("href"); async fetchImage(url: string): Promise<string | undefined> {
return await fetchFile(url);
if (!novelUrl) return; }
novels.push({ filters = {
name: novelName, order: {
url: novelUrl, label: "Sort By",
cover: novelCover, value: "",
}); options: [
}); { label: "Default", value: "" },
return novels; { label: "A-Z", value: "title" },
}
async fetchImage(url: string): Promise<string | undefined> { { label: "Z-A", value: "titlereverse" },
return await fetchFile(url);
} { label: "Latest Update", value: "update" },
filters = { { label: "Latest Added", value: "latest" },
order: {
label: "Sort By", { label: "Popular", value: "popular" },
value: "", ],
options: [ type: FilterTypes.Picker,
{ label: "Default", value: "" }, },
status: {
{ label: "A-Z", value: "title" }, label: "Status",
value: "",
{ label: "Z-A", value: "titlereverse" }, options: [
{ label: "All", value: "" },
{ label: "Latest Update", value: "update" },
{ label: "Ongoing", value: "ongoing" },
{ label: "Latest Added", value: "latest" },
{ label: "Hiatus", value: "hiatus" },
{ label: "Popular", value: "popular" },
], { label: "Completed", value: "completed" },
type: FilterTypes.Picker, ],
}, type: FilterTypes.Picker,
status: { },
label: "Status", type: {
value: "", value: [],
options: [ label: "Type",
{ label: "All", value: "" }, options: [
{ label: "Light Novel (KR)", value: "light-novel-kr" },
{ label: "Ongoing", value: "ongoing" },
{ label: "Web Novel", value: "web-novel" },
{ label: "Hiatus", value: "hiatus" }, ],
type: FilterTypes.CheckboxGroup,
{ label: "Completed", value: "completed" }, },
], genres: {
type: FilterTypes.Picker, label: "Genres",
}, value: [],
type: { options: [
value: [], { label: "Action", value: "action" },
label: "Type",
options: [ { label: "Adult", value: "adult" },
{ label: "Light Novel (KR)", value: "light-novel-kr" },
{ label: "Adventure", value: "adventure" },
{ label: "Web Novel", value: "web-novel" },
], { label: "Comedy", value: "comedy" },
type: FilterTypes.CheckboxGroup,
}, { label: "Ecchi", value: "ecchi" },
genres: {
label: "Genres", { label: "Fantasy", value: "fantasy" },
value: [],
options: [ { label: "Harem", value: "harem" },
{ label: "Action", value: "action" },
{ label: "Josei", value: "josei" },
{ label: "Adult", value: "adult" },
{ label: "Martial Arts", value: "martial-arts" },
{ label: "Adventure", value: "adventure" },
{ label: "Mature", value: "mature" },
{ label: "Comedy", value: "comedy" },
{ label: "Romance", value: "romance" },
{ label: "Ecchi", value: "ecchi" },
{ label: "School Life", value: "school-life" },
{ label: "Fantasy", value: "fantasy" },
{ label: "Sci-fi", value: "sci-fi" },
{ label: "Harem", value: "harem" },
{ label: "Seinen", value: "seinen" },
{ label: "Josei", value: "josei" },
{ label: "Slice of Life", value: "slice-of-life" },
{ label: "Martial Arts", value: "martial-arts" },
{ label: "Smut", value: "smut" },
{ label: "Mature", value: "mature" },
{ label: "Sports", value: "sports" },
{ label: "Romance", value: "romance" },
{ label: "Supernatural", value: "supernatural" },
{ label: "School Life", value: "school-life" },
{ label: "Tragedy", value: "tragedy" },
{ label: "Sci-fi", value: "sci-fi" }, ],
type: FilterTypes.CheckboxGroup,
{ label: "Seinen", value: "seinen" }, },
} satisfies Filters;
{ label: "Slice of Life", value: "slice-of-life" }, }
{ label: "Smut", value: "smut" }, export default new PandaMTL();
{ 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; site: string;
version: string; version: string;
userAgent: string; userAgent: string;
cookieString: string;
constructor() { constructor() {
this.id = "chireads.com"; this.id = "chireads.com";
this.name = "Chireads"; this.name = "Chireads";
@@ -17,7 +17,6 @@ class ChireadsPlugin implements Plugin.PluginBase {
this.site = "https://chireads.com"; this.site = "https://chireads.com";
this.version = "1.0.0"; 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.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) { parseNovels(loadedCheerio: CheerioAPI) {
return []; return [];
+1 -2
View File
@@ -10,7 +10,7 @@ class NovelDeGlacePlugin implements Plugin.PluginBase{
site: string; site: string;
version: string; version: string;
userAgent: string; userAgent: string;
cookieString: string;
constructor() { constructor() {
this.id = "NDG.com"; this.id = "NDG.com";
this.name = "NovelDeGlace"; this.name = "NovelDeGlace";
@@ -18,7 +18,6 @@ class NovelDeGlacePlugin implements Plugin.PluginBase{
this.site = "https://noveldeglace.com/"; this.site = "https://noveldeglace.com/";
this.version = "1.0.0"; this.version = "1.0.0";
this.userAgent = "''"; this.userAgent = "''";
this.cookieString = "''";
} }
async popularNovels(page: number): Promise<Plugin.NovelItem[]> { async popularNovels(page: number): Promise<Plugin.NovelItem[]> {
+413 -426
View File
@@ -1,426 +1,413 @@
import { load as parseHTML } from "cheerio"; import { load as parseHTML } from "cheerio";
import { fetchApi, fetchFile } from "@libs/fetch"; import { fetchApi, fetchFile } from "@libs/fetch";
import { FilterTypes, Filters } from "@libs/filterInputs"; import { FilterTypes, Filters } from "@libs/filterInputs";
import { Plugin } from "@typings/plugin"; import { Plugin } from "@typings/plugin";
class LightNovelBrasil implements Plugin.PluginBase { class LightNovelBrasil implements Plugin.PluginBase {
id = "lightnovelbrasil"; id = "lightnovelbrasil";
name = "Light Novel Brasil"; name = "Light Novel Brasil";
icon = "multisrc/wpmangastream/icons/lightnovelbrasil.png"; icon = "multisrc/wpmangastream/icons/lightnovelbrasil.png";
site = "https://lightnovelbrasil.com/"; site = "https://lightnovelbrasil.com/";
version = "1.0.0"; version = "1.0.0";
userAgent = ""; userAgent = "";
cookieString = ""; async popularNovels(
async popularNovels( pageNo: number,
pageNo: number, { filters }: Plugin.PopularNovelsOptions<typeof this.filters>
{ filters }: Plugin.PopularNovelsOptions<typeof this.filters> ): Promise<Plugin.NovelItem[]> {
): Promise<Plugin.NovelItem[]> { let link = `${this.site}series/?page=${pageNo}`;
let link = `${this.site}series/?page=${pageNo}`;
if (filters.genres.value.length)
if (filters.genres.value.length) link += filters.genres.value.map((i) => `&genre[]=${i}`).join("");
link += filters.genres.value.map((i) => `&genre[]=${i}`).join("");
if (filters.type.value.length)
if (filters.type.value.length) link += filters.type.value.map((i) => `&lang[]=${i}`).join("");
link += filters.type.value.map((i) => `&lang[]=${i}`).join("");
link += "&status=" + (filters?.status ? filters.status : "");
link += "&status=" + (filters?.status ? filters.status : "");
link += "&order=" + (filters?.order ? filters.order : "popular");
link += "&order=" + (filters?.order ? filters.order : "popular");
const headers = new Headers();
const headers = new Headers(); const body = await fetchApi(link, { headers }).then((result) =>
if (this.cookieString) { result.text()
headers.append("cookie", this.cookieString); );
}
const body = await fetchApi(link, { headers }).then((result) => const loadedCheerio = parseHTML(body);
result.text()
); const novels: Plugin.NovelItem[] = [];
const loadedCheerio = parseHTML(body); loadedCheerio("article.bs").each(function () {
const novelName = loadedCheerio(this).find(".ntitle").text().trim();
const novels: Plugin.NovelItem[] = []; let image = loadedCheerio(this).find("img");
const novelCover = image.attr("data-src") || image.attr("src");
loadedCheerio("article.bs").each(function () {
const novelName = loadedCheerio(this).find(".ntitle").text().trim(); const novelUrl = loadedCheerio(this).find("a").attr("href");
let image = loadedCheerio(this).find("img");
const novelCover = image.attr("data-src") || image.attr("src"); if (!novelUrl) return;
const novelUrl = loadedCheerio(this).find("a").attr("href"); const novel = {
name: novelName,
if (!novelUrl) return; cover: novelCover,
url: novelUrl,
const novel = { };
name: novelName,
cover: novelCover, novels.push(novel);
url: novelUrl, });
};
return novels;
novels.push(novel); }
});
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> {
return novels; const url = novelUrl;
} const headers = new Headers();
const result = await fetchApi(url, { headers });
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> { const body = await result.text();
const url = novelUrl;
const headers = new Headers(); let loadedCheerio = parseHTML(body);
if (this.cookieString) {
headers.append("cookie", this.cookieString); const novel: Plugin.SourceNovel = {
} url,
const result = await fetchApi(url, { headers }); chapters: [],
const body = await result.text(); };
let loadedCheerio = parseHTML(body); novel.name = loadedCheerio(".entry-title").text();
const novel: Plugin.SourceNovel = { novel.cover =
url, loadedCheerio("img.wp-post-image").attr("data-src") ||
chapters: [], loadedCheerio("img.wp-post-image").attr("src");
};
loadedCheerio("div.spe > span").each(function () {
novel.name = loadedCheerio(".entry-title").text(); const detailName = loadedCheerio(this).find("b").text().trim();
const detail = loadedCheerio(this)
novel.cover = .find("b")
loadedCheerio("img.wp-post-image").attr("data-src") || .remove()
loadedCheerio("img.wp-post-image").attr("src"); .end()
.text()
loadedCheerio("div.spe > span").each(function () { .trim();
const detailName = loadedCheerio(this).find("b").text().trim();
const detail = loadedCheerio(this) switch (detailName) {
.find("b") case "Autor:":
.remove() case "Author:":
.end() novel.author = detail;
.text() break;
.trim(); case "Status:":
novel.status = detail;
switch (detailName) { break;
case "Autor:": }
case "Author:": });
novel.author = detail;
break; novel.genres = loadedCheerio(".genxed")
case "Status:": .text()
novel.status = detail; .trim()
break; .replace(/\s/g, ",");
}
}); loadedCheerio('div[itemprop="description"] h3,p.a,strong').remove();
novel.summary = loadedCheerio('div[itemprop="description"]')
novel.genres = loadedCheerio(".genxed") .find("br")
.text() .replaceWith("\n")
.trim() .end()
.replace(/\s/g, ","); .text();
loadedCheerio('div[itemprop="description"] h3,p.a,strong').remove(); let chapter: Plugin.ChapterItem[] = [];
novel.summary = loadedCheerio('div[itemprop="description"]')
.find("br") loadedCheerio(".eplister")
.replaceWith("\n") .find("li")
.end() .each(function () {
.text(); const chapterName =
loadedCheerio(this).find(".epl-num").text() +
let chapter: Plugin.ChapterItem[] = []; " - " +
loadedCheerio(this).find(".epl-title").text();
loadedCheerio(".eplister")
.find("li") const releaseDate = loadedCheerio(this)
.each(function () { .find(".epl-date")
const chapterName = .text()
loadedCheerio(this).find(".epl-num").text() + .trim();
" - " +
loadedCheerio(this).find(".epl-title").text(); const chapterUrl = loadedCheerio(this).find("a").attr("href");
const releaseDate = loadedCheerio(this) if (!chapterUrl) return;
.find(".epl-date")
.text() chapter.push({
.trim(); name: chapterName,
releaseTime: releaseDate,
const chapterUrl = loadedCheerio(this).find("a").attr("href"); url: chapterUrl,
});
if (!chapterUrl) return; });
chapter.push({ novel.chapters = chapter.reverse();
name: chapterName,
releaseTime: releaseDate, return novel;
url: chapterUrl, }
}); async parseChapter(chapterUrl: string): Promise<string> {
}); const headers = new Headers();
const result = await fetchApi(chapterUrl, { headers });
novel.chapters = chapter.reverse(); const body = await result.text();
return novel; const loadedCheerio = parseHTML(body);
}
async parseChapter(chapterUrl: string): Promise<string> { let chapterText = loadedCheerio(".epcontent").html() || "";
const headers = new Headers();
if (this.cookieString) { return chapterText;
headers.append("cookie", this.cookieString); }
}
const result = await fetchApi(chapterUrl, { headers }); async searchNovels(
const body = await result.text(); searchTerm: string,
pageNo?: number | undefined
const loadedCheerio = parseHTML(body); ): Promise<Plugin.NovelItem[]> {
const url = `${this.site}?s=${searchTerm}`;
let chapterText = loadedCheerio(".epcontent").html() || ""; const headers = new Headers();
const result = await fetchApi(url, { headers });
return chapterText; const body = await result.text();
}
const loadedCheerio = parseHTML(body);
async searchNovels(
searchTerm: string, const novels: Plugin.NovelItem[] = [];
pageNo?: number | undefined
): Promise<Plugin.NovelItem[]> { loadedCheerio("article.bs").each(function () {
const url = `${this.site}?s=${searchTerm}`; const novelName = loadedCheerio(this).find(".ntitle").text().trim();
const headers = new Headers(); const novelCover = loadedCheerio(this).find("img").attr("src");
if (this.cookieString) { const novelUrl = loadedCheerio(this).find("a").attr("href");
headers.append("cookie", this.cookieString); if (!novelUrl) return;
}
const result = await fetchApi(url, { headers }); novels.push({
const body = await result.text(); name: novelName,
url: novelUrl,
const loadedCheerio = parseHTML(body); cover: novelCover,
});
const novels: Plugin.NovelItem[] = []; });
loadedCheerio("article.bs").each(function () { return novels;
const novelName = loadedCheerio(this).find(".ntitle").text().trim(); }
const novelCover = loadedCheerio(this).find("img").attr("src"); async fetchImage(url: string): Promise<string | undefined> {
const novelUrl = loadedCheerio(this).find("a").attr("href"); return await fetchFile(url);
if (!novelUrl) return; }
novels.push({ filters = {
name: novelName, order: {
url: novelUrl, label: "Sort By",
cover: novelCover, value: "",
}); options: [
}); { label: "Default", value: "" },
return novels; { label: "A-Z", value: "title" },
}
async fetchImage(url: string): Promise<string | undefined> { { label: "Z-A", value: "titlereverse" },
return await fetchFile(url);
} { label: "Latest Update", value: "update" },
filters = { { label: "Latest Added", value: "latest" },
order: {
label: "Sort By", { label: "Popular", value: "popular" },
value: "", ],
options: [ type: FilterTypes.Picker,
{ label: "Default", value: "" }, },
status: {
{ label: "A-Z", value: "title" }, label: "Status",
value: "",
{ label: "Z-A", value: "titlereverse" }, options: [
{ label: "All", value: "" },
{ label: "Latest Update", value: "update" },
{ label: "Ongoing", value: "ongoing" },
{ label: "Latest Added", value: "latest" },
{ label: "Hiatus", value: "hiatus" },
{ label: "Popular", value: "popular" },
], { label: "Completed", value: "completed" },
type: FilterTypes.Picker, ],
}, type: FilterTypes.Picker,
status: { },
label: "Status", type: {
value: "", label: "Type",
options: [ value: [],
{ label: "All", value: "" }, options: [
{ label: "Chinese novel", value: "chinese-novel" },
{ label: "Ongoing", value: "ongoing" },
{ label: "habyeol", value: "habyeol" },
{ label: "Hiatus", value: "hiatus" },
{ label: "korean novel", value: "korean-novel" },
{ label: "Completed", value: "completed" },
], { label: "Web Novel", value: "web-novel" },
type: FilterTypes.Picker,
}, { label: "삼심", value: "%ec%82%bc%ec%8b%ac" },
type: {
label: "Type", { label: "호곡", value: "%ed%98%b8%ea%b3%a1" },
value: [], ],
options: [ type: FilterTypes.CheckboxGroup,
{ label: "Chinese novel", value: "chinese-novel" }, },
genres: {
{ label: "habyeol", value: "habyeol" }, value: [],
label: "Genres",
{ label: "korean novel", value: "korean-novel" }, options: [
{ label: "A.I", value: "a.i" },
{ label: "Web Novel", value: "web-novel" },
{ label: "Academy", value: "academy" },
{ label: "삼심", value: "%ec%82%bc%ec%8b%ac" },
{ label: "Action", value: "action" },
{ label: "호곡", value: "%ed%98%b8%ea%b3%a1" },
], { label: "Adult", value: "adult" },
type: FilterTypes.CheckboxGroup,
}, { label: "Adventure", value: "adventure" },
genres: {
value: [], { label: "Alternative History", value: "alternative-history" },
label: "Genres",
options: [ { label: "Another World", value: "another-world" },
{ label: "A.I", value: "a.i" },
{ label: "Apocalypse", value: "apocalypse" },
{ label: "Academy", value: "academy" },
{ label: "Bromance", value: "bromance" },
{ label: "Action", value: "action" },
{ label: "Comedy", value: "comedy" },
{ label: "Adult", value: "adult" },
{ label: "Dark fantasy", value: "dark-fantasy" },
{ label: "Adventure", value: "adventure" },
{ label: "Demons", value: "demons" },
{ label: "Alternative History", value: "alternative-history" },
{ label: "Drama", value: "drama" },
{ label: "Another World", value: "another-world" },
{ label: "Dystopia", value: "dystopia" },
{ label: "Apocalypse", value: "apocalypse" },
{ label: "Ecchi", value: "ecchi" },
{ label: "Bromance", value: "bromance" },
{ label: "Entertainment", value: "entertainment" },
{ label: "Comedy", value: "comedy" },
{ label: "Exhaustion", value: "exhaustion" },
{ label: "Dark fantasy", value: "dark-fantasy" },
{ label: "Fanfiction", value: "fanfiction" },
{ label: "Demons", value: "demons" },
{ label: "fantasy", value: "fantasy" },
{ label: "Drama", value: "drama" },
{ label: "finance", value: "finance" },
{ label: "Dystopia", value: "dystopia" },
{ label: "Full color", value: "full-color" },
{ label: "Ecchi", value: "ecchi" },
{ label: "Game", value: "game" },
{ label: "Entertainment", value: "entertainment" },
{ label: "Gender Bender", value: "gender-bender" },
{ label: "Exhaustion", value: "exhaustion" },
{ label: "Genius", value: "genius" },
{ label: "Fanfiction", value: "fanfiction" },
{ label: "Harem", value: "harem" },
{ label: "fantasy", value: "fantasy" },
{ label: "Hero", value: "hero" },
{ label: "finance", value: "finance" },
{ label: "Historical", value: "historical" },
{ label: "Full color", value: "full-color" },
{ label: "Hunter", value: "hunter" },
{ label: "Game", value: "game" },
{ label: "korean novel", value: "korean-novel" },
{ label: "Gender Bender", value: "gender-bender" },
{ label: "Light Novel", value: "light-novel" },
{ label: "Genius", value: "genius" },
{
{ label: "Harem", value: "harem" }, label: "List Adventure Manga Genres",
value: "list-adventure-manga-genres",
{ label: "Hero", value: "hero" }, },
{ label: "Historical", value: "historical" }, { label: "Long Strip", value: "long-strip" },
{ label: "Hunter", value: "hunter" }, { label: "Love comedy", value: "love-comedy" },
{ label: "korean novel", value: "korean-novel" }, { label: "magic", value: "magic" },
{ label: "Light Novel", value: "light-novel" }, { label: "Manhua", value: "manhua" },
{ { label: "Martial Arts", value: "martial-arts" },
label: "List Adventure Manga Genres",
value: "list-adventure-manga-genres", { label: "Mature", value: "mature" },
},
{ label: "Medieval", value: "medieval" },
{ label: "Long Strip", value: "long-strip" },
{ label: "Misunderstanding", value: "misunderstanding" },
{ label: "Love comedy", value: "love-comedy" },
{ label: "Modern", value: "modern" },
{ label: "magic", value: "magic" },
{ label: "modern fantasy", value: "modern-fantasy" },
{ label: "Manhua", value: "manhua" },
{ label: "music", value: "music" },
{ label: "Martial Arts", value: "martial-arts" },
{ label: "Mystery", value: "mystery" },
{ label: "Mature", value: "mature" },
{ label: "Necromancy", value: "necromancy" },
{ label: "Medieval", value: "medieval" },
{ label: "No Romance", value: "no-romance" },
{ label: "Misunderstanding", value: "misunderstanding" },
{ label: "NTL", value: "ntl" },
{ label: "Modern", value: "modern" },
{ label: "o", value: "o" },
{ label: "modern fantasy", value: "modern-fantasy" },
{ label: "Obsession", value: "obsession" },
{ label: "music", value: "music" },
{ label: "Politics", value: "politics" },
{ label: "Mystery", value: "mystery" },
{ label: "Possession", value: "possession" },
{ label: "Necromancy", value: "necromancy" },
{ label: "Programming", value: "programming" },
{ label: "No Romance", value: "no-romance" },
{ label: "Psychological", value: "psychological" },
{ label: "NTL", value: "ntl" },
{ label: "Pure Love", value: "pure-love" },
{ label: "o", value: "o" },
{ label: "Redemption", value: "redemption" },
{ label: "Obsession", value: "obsession" },
{ label: "Regression", value: "regression" },
{ label: "Politics", value: "politics" },
{ label: "Regret", value: "regret" },
{ label: "Possession", value: "possession" },
{ label: "Reincarnation", value: "reincarnation" },
{ label: "Programming", value: "programming" },
{ label: "Revenge", value: "revenge" },
{ label: "Psychological", value: "psychological" },
{ label: "Romance", value: "romance" },
{ label: "Pure Love", value: "pure-love" },
{ label: "Romance Fanrasy", value: "romance-fanrasy" },
{ label: "Redemption", value: "redemption" },
{ label: "Salvation", value: "salvation" },
{ label: "Regression", value: "regression" },
{ label: "School Life", value: "school-life" },
{ label: "Regret", value: "regret" },
{ label: "Sci-fi", value: "sci-fi" },
{ label: "Reincarnation", value: "reincarnation" },
{ label: "Science fiction", value: "science-fiction" },
{ label: "Revenge", value: "revenge" },
{ label: "Seinen", value: "seinen" },
{ label: "Romance", value: "romance" },
{ label: "Shounen", value: "shounen" },
{ label: "Romance Fanrasy", value: "romance-fanrasy" },
{ label: "Slice of Life", value: "slice-of-life" },
{ label: "Salvation", value: "salvation" },
{ label: "Soft yandere", value: "soft-yandere" },
{ label: "School Life", value: "school-life" },
{ label: "Sports", value: "sports" },
{ label: "Sci-fi", value: "sci-fi" },
{ label: "Supernatural", value: "supernatural" },
{ label: "Science fiction", value: "science-fiction" },
{ label: "Survival", value: "survival" },
{ label: "Seinen", value: "seinen" },
{ label: "system", value: "system" },
{ label: "Shounen", value: "shounen" },
{ label: "Time limit", value: "time-limit" },
{ label: "Slice of Life", value: "slice-of-life" },
{ label: "Tragedy", value: "tragedy" },
{ label: "Soft yandere", value: "soft-yandere" },
{ label: "Transmigration", value: "transmigration" },
{ label: "Sports", value: "sports" },
{ label: "TS", value: "ts" },
{ label: "Supernatural", value: "supernatural" },
{ label: "Tsundere", value: "tsundere" },
{ label: "Survival", value: "survival" },
{ label: "Unique", value: "unique" },
{ label: "system", value: "system" },
{ label: "Wholesome", value: "wholesome" },
{ label: "Time limit", value: "time-limit" },
{ label: "Wuxia", value: "wuxia" },
{ label: "Tragedy", value: "tragedy" },
{ label: "Xuanhuan", value: "xuanhuan" },
{ label: "Transmigration", value: "transmigration" },
{ label: "Yandere", value: "yandere" },
{ label: "TS", value: "ts" },
{ label: "Yuri", value: "yuri" },
{ label: "Tsundere", value: "tsundere" }, ],
type: FilterTypes.CheckboxGroup,
{ label: "Unique", value: "unique" }, },
} satisfies Filters;
{ label: "Wholesome", value: "wholesome" }, }
{ label: "Wuxia", value: "wuxia" }, export default new LightNovelBrasil();
{ 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 { Plugin } from "@typings/plugin";
import { FilterTypes, Filters } from "@libs/filterInputs"; import { FilterTypes, Filters } from "@libs/filterInputs";
import { fetchApi, fetchFile } from "@libs/fetch"; import { fetchApi, fetchFile } from "@libs/fetch";
import { NovelStatus } from "@libs/novelStatus"; import { NovelStatus } from "@libs/novelStatus";
import { load as parseHTML } from "cheerio"; import { load as parseHTML } from "cheerio";
class freedlit implements Plugin.PluginBase { class freedlit implements Plugin.PluginBase {
id = "freedlit.space"; id = "freedlit.space";
name = "LitSpace"; name = "LitSpace";
site = "https://freedlit.space"; site = "https://freedlit.space";
version = "1.0.0"; version = "1.0.0";
icon = "src/ru/freedlit/icon.png"; icon = "src/ru/freedlit/icon.png";
userAgent = ""; userAgent = "";
cookieString = "";
async popularNovels(
async popularNovels( page: number,
page: number, { showLatestNovels, filters }: Plugin.PopularNovelsOptions<typeof this.filters>,
{ showLatestNovels, filters }: Plugin.PopularNovelsOptions<typeof this.filters>, ): Promise<Plugin.NovelItem[]> {
): Promise<Plugin.NovelItem[]> { let url = this.site + "/get-books/all/list/" + page + "?sort=";
let url = this.site + "/get-books/all/list/" + page + "?sort="; url += showLatestNovels ? "recent" : filters?.sort?.value || "popular";
url += showLatestNovels ? "recent" : filters?.sort?.value || "popular"; url += "&status=" + (filters?.status?.value || "all");
url += "&status=" + (filters?.status?.value || "all"); url += "&access=" + (filters?.access?.value || "all");
url += "&access=" + (filters?.access?.value || "all"); url += "&adult=" + (filters?.adult?.value || "hide");
url += "&adult=" + (filters?.adult?.value || "hide");
if (filters?.genre?.value?.include?.length) {
if (filters?.genre?.value?.include?.length) { url += filters.genre.value.include
url += filters.genre.value.include .map(id => '&genres_included[]=' + id).join("");
.map(id => '&genres_included[]=' + id).join(""); }
}
if (filters?.genre?.value?.exclude?.length) {
if (filters?.genre?.value?.exclude?.length) { url += filters.genre.value.exclude
url += filters.genre.value.exclude .map(id => '&genres_excluded[]=' + id).join("");
.map(id => '&genres_excluded[]=' + id).join(""); }
}
const body = await fetchApi(url).then((res) => res.text());
const body = await fetchApi(url).then((res) => res.text()); const loadedCheerio = parseHTML(body);
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = [];
const novels: Plugin.NovelItem[] = []; loadedCheerio("#bookListBlock > div > div").each(function () {
loadedCheerio("#bookListBlock > div > div").each(function () { const name = loadedCheerio(this).find("div > h4 > a").text()?.trim();
const name = loadedCheerio(this).find("div > h4 > a").text()?.trim(); const cover = loadedCheerio(this)
const cover = loadedCheerio(this) .find("div > a > img")
.find("div > a > img") .attr("src")
.attr("src") ?.trim();
?.trim(); const url = loadedCheerio(this).find("div > h4 > a").attr("href")?.trim();
const url = loadedCheerio(this).find("div > h4 > a").attr("href")?.trim(); if (!name || !url) return;
if (!name || !url) return;
novels.push({ name, cover, url });
novels.push({ name, cover, url }); });
});
return novels;
return novels; }
}
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> {
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> { const body = await fetchApi(novelUrl).then((res) => res.text());
const body = await fetchApi(novelUrl).then((res) => res.text()); const loadedCheerio = parseHTML(body);
const loadedCheerio = parseHTML(body);
const novel: Plugin.SourceNovel = {
const novel: Plugin.SourceNovel = { url: novelUrl,
url: novelUrl, name: loadedCheerio(".book-info h4").text(),
name: loadedCheerio(".book-info h4").text(), cover: loadedCheerio(".book-cover > div > img").attr("src")?.trim(),
cover: loadedCheerio(".book-cover > div > img").attr("src")?.trim(), summary: loadedCheerio("#nav-home").text()?.trim(),
summary: loadedCheerio("#nav-home").text()?.trim(), author: loadedCheerio(".book-info h5 > a").text(),
author: loadedCheerio(".book-info h5 > a").text(), genres: loadedCheerio(".genre-list > a")
genres: loadedCheerio(".genre-list > a") .map((index, element) => loadedCheerio(element).text())
.map((index, element) => loadedCheerio(element).text()) .get()
.get() .join(","),
.join(","), };
};
const chapters: Plugin.ChapterItem[] = [];
const chapters: Plugin.ChapterItem[] = [];
loadedCheerio("a.chapter-line").each(function () {
loadedCheerio("a.chapter-line").each(function () { const name = loadedCheerio(this).find("h6").text();
const name = loadedCheerio(this).find("h6").text(); const releaseTime = loadedCheerio(this).find('span[class="date"]').text();
const releaseTime = loadedCheerio(this).find('span[class="date"]').text(); const url = loadedCheerio(this).attr("href");
const url = loadedCheerio(this).attr("href"); if (!name || !url) return;
if (!name || !url) return;
chapters.push({ name, releaseTime, url });
chapters.push({ name, releaseTime, url }); });
});
novel.chapters = chapters;
novel.chapters = chapters; return novel;
return novel; }
}
async parseChapter(chapterUrl: string): Promise<string> {
async parseChapter(chapterUrl: string): Promise<string> { const body = await fetchApi(chapterUrl).then((res) => res.text());
const body = await fetchApi(chapterUrl).then((res) => res.text()); const loadedCheerio = parseHTML(body);
const loadedCheerio = parseHTML(body);
loadedCheerio("div.mobile-block").remove();
loadedCheerio("div.mobile-block").remove(); loadedCheerio("div.standart-block").remove();
loadedCheerio("div.standart-block").remove();
const chapterText = loadedCheerio('div[class="chapter"]').html() || "";
const chapterText = loadedCheerio('div[class="chapter"]').html() || ""; return chapterText;
return chapterText; }
}
async searchNovels(searchTerm: string): Promise<Plugin.NovelItem[]> {
async searchNovels(searchTerm: string): Promise<Plugin.NovelItem[]> { const url = `${this.site}/search?query=${searchTerm}&type=all`;
const url = `${this.site}/search?query=${searchTerm}&type=all`; const body = await fetchApi(url).then((res) => res.text());
const body = await fetchApi(url).then((res) => res.text()); const loadedCheerio = parseHTML(body);
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = [];
const novels: Plugin.NovelItem[] = []; loadedCheerio("#bookListBlock > div").each(function () {
loadedCheerio("#bookListBlock > div").each(function () { const name = loadedCheerio(this).find("h4 > a").text()?.trim();
const name = loadedCheerio(this).find("h4 > a").text()?.trim(); const cover = loadedCheerio(this).find("a > img").attr("src")?.trim();
const cover = loadedCheerio(this).find("a > img").attr("src")?.trim(); const url = loadedCheerio(this).find("h4 > a").attr("href")?.trim();
const url = loadedCheerio(this).find("h4 > a").attr("href")?.trim(); if (!name || !url) return;
if (!name || !url) return;
novels.push({ name, cover, url });
novels.push({ name, cover, url }); });
});
return novels;
return novels; }
} fetchImage = fetchFile;
fetchImage = fetchFile;
filters = {
filters = { sort: {
sort: { label: "Сортировка:",
label: "Сортировка:", value: "",
value: "", options: [
options: [ { label: "По популярности", value: "popular" },
{ label: "По популярности", value: "popular" }, { label: "По количеству комментариев", value: "comments" },
{ label: "По количеству комментариев", value: "comments" }, { label: "По количеству лайков", value: "likes" },
{ label: "По количеству лайков", value: "likes" }, { label: "По новизне", value: "recent" },
{ label: "По новизне", value: "recent" }, { label: "По просмотрам", value: "views" },
{ label: "По просмотрам", value: "views" }, ],
], type: FilterTypes.Picker,
type: FilterTypes.Picker, },
}, genre: {
genre: { label: "Жанры:",
label: "Жанры:", value: { include: [], exclude: [] },
value: { include: [], exclude: [] }, options: [
options: [ { label: "Любой жанр", value: "all" },
{ label: "Любой жанр", value: "all" }, { label: "Альтернативная история", value: "alternative-history" },
{ label: "Альтернативная история", value: "alternative-history" }, { label: "Антиутопия", value: "dystopia" },
{ label: "Антиутопия", value: "dystopia" }, { label: "Бизнес-литература", value: "business-literature" },
{ label: "Бизнес-литература", value: "business-literature" }, { label: "Боевая фантастика", value: "combat-fiction" },
{ label: "Боевая фантастика", value: "combat-fiction" }, { label: "Боевик", value: "action" },
{ label: "Боевик", value: "action" }, { label: "Боевое фэнтези", value: "combat-fantasy" },
{ label: "Боевое фэнтези", value: "combat-fantasy" }, { label: "Бояръ-Аниме", value: "boyar-anime" },
{ label: "Бояръ-Аниме", value: "boyar-anime" }, { label: "Героическая фантастика", value: "heroic-fiction" },
{ label: "Героическая фантастика", value: "heroic-fiction" }, { label: "Героическое фэнтези", value: "heroic-fantasy" },
{ label: "Героическое фэнтези", value: "heroic-fantasy" }, { label: "Городское фэнтези", value: "urban-fantasy" },
{ label: "Городское фэнтези", value: "urban-fantasy" }, { label: "Гримдарк", value: "grimdark" },
{ label: "Гримдарк", value: "grimdark" }, { label: "Детектив", value: "mystery" },
{ label: "Детектив", value: "mystery" }, { label: "Детская литература", value: "kids-literature" },
{ label: "Детская литература", value: "kids-literature" }, { label: "Документальная проза", value: "biography" },
{ label: "Документальная проза", value: "biography" }, { label: "Историческая проза", value: "historical-fiction" },
{ label: "Историческая проза", value: "historical-fiction" }, { label: "Исторический детектив", value: "historical-mystery" },
{ label: "Исторический детектив", value: "historical-mystery" }, { label: "Исторический любовный роман", value: "historical-romantic-novel" },
{ label: "Исторический любовный роман", value: "historical-romantic-novel" }, { label: "Историческое фэнтези", value: "historical-fantasy" },
{ label: "Историческое фэнтези", value: "historical-fantasy" }, { label: "Киберпанк", value: "cyberpunk" },
{ label: "Киберпанк", value: "cyberpunk" }, { label: "Космическая фантастика", value: "cosmic-fiction" },
{ label: "Космическая фантастика", value: "cosmic-fiction" }, { label: "ЛитРПГ", value: "litrpg" },
{ label: "ЛитРПГ", value: "litrpg" }, { label: "Лоу / Низкое фэнтези", value: "low-fantasy" },
{ label: "Лоу / Низкое фэнтези", value: "low-fantasy" }, { label: "Любовное фэнтези", value: "romantic-fantasy" },
{ label: "Любовное фэнтези", value: "romantic-fantasy" }, { label: "Любовный роман", value: "romantic-novel" },
{ label: "Любовный роман", value: "romantic-novel" }, { label: "Мистика", value: "mystic" },
{ label: "Мистика", value: "mystic" }, { label: "Мистический детектив", value: "mystic-detective" },
{ label: "Мистический детектив", value: "mystic-detective" }, { label: "Научная фантастика", value: "science-fiction" },
{ label: "Научная фантастика", value: "science-fiction" }, { label: "Подростковая проза", value: "young-adult" },
{ label: "Подростковая проза", value: "young-adult" }, { label: "Политический роман", value: "political-romance" },
{ label: "Политический роман", value: "political-romance" }, { label: "Попаданцы", value: "accidental-travel" },
{ label: "Попаданцы", value: "accidental-travel" }, { label: "Попаданцы в магические миры", value: "magic-worlds-travel" },
{ label: "Попаданцы в магические миры", value: "magic-worlds-travel" }, { label: "Попаданцы во времени", value: "time-travel" },
{ label: "Попаданцы во времени", value: "time-travel" }, { label: "Порнотика", value: "pornotica" },
{ label: "Порнотика", value: "pornotica" }, { label: "Постапокалипсис", value: "post-apocalypse" },
{ label: "Постапокалипсис", value: "post-apocalypse" }, { label: "Поэзия", value: "poetry" },
{ label: "Поэзия", value: "poetry" }, { label: "Приключения", value: "adventure" },
{ label: "Приключения", value: "adventure" }, { label: "Публицистика", value: "journalism" },
{ label: "Публицистика", value: "journalism" }, { label: "Пьеса", value: "play" },
{ label: "Пьеса", value: "play" }, { label: "Развитие личности", value: "how-to-book" },
{ label: "Развитие личности", value: "how-to-book" }, { label: "Разное", value: "other" },
{ label: "Разное", value: "other" }, { label: "Реализм", value: "Realism" },
{ label: "Реализм", value: "Realism" }, { label: "РеалРПГ", value: "realrpg" },
{ label: "РеалРПГ", value: "realrpg" }, { label: "Репликация", value: "replication" },
{ label: "Репликация", value: "replication" }, { label: "Романтическая эротика", value: "romantic-erotic-fiction" },
{ label: "Романтическая эротика", value: "romantic-erotic-fiction" }, { label: "Сказка", value: "fairy-tale" },
{ label: "Сказка", value: "fairy-tale" }, { label: "Слэш", value: "slash" },
{ label: "Слэш", value: "slash" }, { label: "Современная проза", value: "modern-prose" },
{ label: "Современная проза", value: "modern-prose" }, { label: "Современный любовный роман", value: "modern-romantic-novel" },
{ label: "Современный любовный роман", value: "modern-romantic-novel" }, { label: "Социальная фантастика", value: "social-fiction" },
{ label: "Социальная фантастика", value: "social-fiction" }, { label: "Стимпанк", value: "steampunk" },
{ label: "Стимпанк", value: "steampunk" }, { label: "Сценарий", value: "scenario" },
{ label: "Сценарий", value: "scenario" }, { label: "Сюаньхуань", value: "xuanhuan" },
{ label: "Сюаньхуань", value: "xuanhuan" }, { label: "Сянься", value: "xianxia" },
{ label: "Сянься", value: "xianxia" }, { label: "Тёмное фэнтези", value: "dark-fantasy" },
{ label: "Тёмное фэнтези", value: "dark-fantasy" }, { label: "Триллер", value: "thriller" },
{ label: "Триллер", value: "thriller" }, { label: "Уся", value: "wuxia" },
{ label: "Уся", value: "wuxia" }, { label: "Фантастика", value: "fiction" },
{ label: "Фантастика", value: "fiction" }, { label: "Фантастический детектив", value: "mystery-fiction" },
{ label: "Фантастический детектив", value: "mystery-fiction" }, { label: "Фанфик", value: "fan-fiction" },
{ label: "Фанфик", value: "fan-fiction" }, { label: "Фемслэш", value: "femslash" },
{ label: "Фемслэш", value: "femslash" }, { label: "Фэнтези", value: "fantasy" },
{ label: "Фэнтези", value: "fantasy" }, { label: "Хоррор", value: "horror" },
{ label: "Хоррор", value: "horror" }, { label: "Шпионский детектив", value: "spy-crime" },
{ label: "Шпионский детектив", value: "spy-crime" }, { label: "Эпическое фэнтези", value: "epic-fantasy" },
{ label: "Эпическое фэнтези", value: "epic-fantasy" }, { label: "Эротика", value: "erotic-fiction" },
{ label: "Эротика", value: "erotic-fiction" }, { label: "Эротическая фантастика", value: "erotic-fiction" },
{ label: "Эротическая фантастика", value: "erotic-fiction" }, { label: "Эротический фанфик", value: "erotic-fan-fiction" },
{ label: "Эротический фанфик", value: "erotic-fan-fiction" }, { label: "Эротическое фэнтези", value: "erotic-fantasy" },
{ label: "Эротическое фэнтези", value: "erotic-fantasy" }, { label: "Этническое фэнтези", value: "ethnic-fantasy" },
{ label: "Этническое фэнтези", value: "ethnic-fantasy" }, { label: "Юмор", value: "humor" },
{ label: "Юмор", value: "humor" }, { label: "Юмористическая фантастика", value: "humor-fiction" },
{ label: "Юмористическая фантастика", value: "humor-fiction" }, { label: "Юмористическое фэнтези", value: "humor-fantasy" },
{ label: "Юмористическое фэнтези", value: "humor-fantasy" }, { label: "RPS", value: "rps" },
{ label: "RPS", value: "rps" }, ],
], type: FilterTypes.ExcludableCheckboxGroup,
type: FilterTypes.ExcludableCheckboxGroup, },
}, status: {
status: { label: "Статус:",
label: "Статус:", value: "",
value: "", options: [
options: [ { label: "Любой статус", value: "all" },
{ label: "Любой статус", value: "all" }, { label: "В процессе", value: "in-process" },
{ label: "В процессе", value: "in-process" }, { label: "Завершено", value: "finished" },
{ label: "Завершено", value: "finished" }, ],
], type: FilterTypes.Picker,
type: FilterTypes.Picker, },
}, access: {
access: { label: "Доступ:",
label: "Доступ:", value: "",
value: "", options: [
options: [ { label: "Любой доступ", value: "all" },
{ label: "Любой доступ", value: "all" }, { label: "Бесплатные", value: "free" },
{ label: "Бесплатные", value: "free" }, { label: "Платные", value: "paid" },
{ label: "Платные", value: "paid" }, ],
], type: FilterTypes.Picker,
type: FilterTypes.Picker, },
}, adult: {
adult: { label: "Возрастные ограничения:",
label: "Возрастные ограничения:", value: "",
value: "", options: [
options: [ { label: "Скрыть 18+", value: "hide" },
{ label: "Скрыть 18+", value: "hide" }, { label: "Показать +18", value: "show" },
{ label: "Показать +18", value: "show" }, ],
], type: FilterTypes.Picker,
type: FilterTypes.Picker, },
}, } satisfies Filters;
} satisfies Filters; }
}
export default new freedlit();
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 { Plugin } from "@typings/plugin";
import { FilterTypes, Filters } from "@libs/filterInputs"; import { FilterTypes, Filters } from "@libs/filterInputs";
import { fetchApi, fetchFile } from "@libs/fetch"; import { fetchApi, fetchFile } from "@libs/fetch";
import { NovelStatus } from "@libs/novelStatus"; import { NovelStatus } from "@libs/novelStatus";
import { load as parseHTML } from "cheerio"; import { load as parseHTML } from "cheerio";
import dayjs from "dayjs"; import dayjs from "dayjs";
class Bookriver implements Plugin.PluginBase { class Bookriver implements Plugin.PluginBase {
id = "bookriver"; id = "bookriver";
name = "Bookriver"; name = "Bookriver";
site = "https://bookriver.ru"; site = "https://bookriver.ru";
version = "1.0.0"; version = "1.0.0";
icon = "src/ru/bookriver/icon.png"; icon = "src/ru/bookriver/icon.png";
userAgent = ""; userAgent = "";
cookieString = "";
async popularNovels(
async popularNovels( pageNo: number,
pageNo: number, { showLatestNovels, filters }: Plugin.PopularNovelsOptions,
{ showLatestNovels, filters }: Plugin.PopularNovelsOptions, ): Promise<Plugin.NovelItem[]> {
): Promise<Plugin.NovelItem[]> { let url = this.site + `/genre?page=${pageNo}&perPage=24&sortingType=`;
let url = this.site + `/genre?page=${pageNo}&perPage=24&sortingType=`; url += showLatestNovels
url += showLatestNovels ? "last-update"
? "last-update" : filters?.sort?.value || "bestseller";
: filters?.sort?.value || "bestseller";
if (filters?.genres?.value instanceof Array && filters?.genres?.value.length) {
if (filters?.genres?.value instanceof Array && filters?.genres?.value.length) { url += "&g=" + filters.genres.value.join(",");
url += "&g=" + filters.genres.value.join(","); }
}
const result = await fetchApi(url);
const result = await fetchApi(url); const body = await result.text();
const body = await result.text();
const loadedCheerio = parseHTML(body);
const loadedCheerio = parseHTML(body); const novels: Plugin.NovelItem[] = [];
const novels: Plugin.NovelItem[] = [];
const jsonRaw = loadedCheerio("#__NEXT_DATA__").html();
const jsonRaw = loadedCheerio("#__NEXT_DATA__").html(); if (jsonRaw) {
if (jsonRaw) { const json: response = JSON.parse(jsonRaw);
const json: response = JSON.parse(jsonRaw); json.props.pageProps.state.pagesFilter?.genre?.books?.forEach((novel) =>
json.props.pageProps.state.pagesFilter?.genre?.books?.forEach((novel) => novels.push({
novels.push({ name: novel.name,
name: novel.name, cover: novel.coverImages[0].url,
cover: novel.coverImages[0].url, url: this.site + "/book/" + novel.slug,
url: this.site + "/book/" + novel.slug, }),
}), );
); }
} return novels;
return novels; }
}
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> {
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> { const result = await fetchApi(novelUrl);
const result = await fetchApi(novelUrl); const body = await result.text();
const body = await result.text();
const loadedCheerio = parseHTML(body);
const loadedCheerio = parseHTML(body); const jsonRaw = loadedCheerio("#__NEXT_DATA__").html();
const jsonRaw = loadedCheerio("#__NEXT_DATA__").html(); const json: response = JSON.parse(jsonRaw || "{}");
const json: response = JSON.parse(jsonRaw || "{}"); const book = json.props.pageProps.state.book?.bookPage;
const book = json.props.pageProps.state.book?.bookPage; const novel: Plugin.SourceNovel = {
const novel: Plugin.SourceNovel = { url: novelUrl,
url: novelUrl, name: book?.name,
name: book?.name, cover: book?.coverImages[0].url,
cover: book?.coverImages[0].url, summary: book?.annotation,
summary: book?.annotation, author: book?.author?.name,
author: book?.author?.name, genres: book?.tags?.map((item) => item.name).join(", "),
genres: book?.tags?.map((item) => item.name).join(", "), status:
status: book?.statusComplete === "writing"
book?.statusComplete === "writing" ? NovelStatus.Ongoing
? NovelStatus.Ongoing : NovelStatus.Completed,
: NovelStatus.Completed, };
};
const chapters: Plugin.ChapterItem[] = [];
const chapters: Plugin.ChapterItem[] = []; book?.ebook?.chapters?.forEach((chapter) => {
book?.ebook?.chapters?.forEach((chapter) => { if (chapter.available) {
if (chapter.available) { chapters.push({
chapters.push({ name: chapter.name,
name: chapter.name, releaseTime: dayjs(
releaseTime: dayjs( chapter?.firstPublishedAt || chapter.createdAt,
chapter?.firstPublishedAt || chapter.createdAt, ).format("LLL"),
).format("LLL"), url: this.site + "/reader/" + book?.slug + "/" + chapter.chapterId,
url: this.site + "/reader/" + book?.slug + "/" + chapter.chapterId, });
}); }
} });
}); novel.chapters = chapters;
novel.chapters = chapters; return novel;
return novel; }
}
async parseChapter(chapterUrl: string): Promise<string> {
async parseChapter(chapterUrl: string): Promise<string> { const url = "https://api.bookriver.ru/api/v1/books/chapter/text/";
const url = "https://api.bookriver.ru/api/v1/books/chapter/text/"; const result = await fetchApi(url + chapterUrl.split("/").pop());
const result = await fetchApi(url + chapterUrl.split("/").pop()); const json = (await result.json()) as responseChapter;
const json = (await result.json()) as responseChapter;
let chapterText = json.data.content || "Конец произведения";
let chapterText = json.data.content || "Конец произведения"; if (json.data?.audio?.available) {
if (json.data?.audio?.available) { chapterText += "\n" + json.data.audio.url;
chapterText += "\n" + json.data.audio.url; }
}
return chapterText;
return chapterText; }
}
async searchNovels(
async searchNovels( searchTerm: string,
searchTerm: string, pageNo: number | undefined = 1,
pageNo: number | undefined = 1, ): Promise<Plugin.NovelItem[]> {
): Promise<Plugin.NovelItem[]> { const url = `https://api.bookriver.ru/api/v1/search/autocomplete?keyword=${searchTerm}&page=${pageNo}&perPage=10`;
const url = `https://api.bookriver.ru/api/v1/search/autocomplete?keyword=${searchTerm}&page=${pageNo}&perPage=10`; const result = await fetchApi(url);
const result = await fetchApi(url); const json = (await result.json()) as responseSearch;
const json = (await result.json()) as responseSearch;
const novels: Plugin.NovelItem[] = [];
const novels: Plugin.NovelItem[] = []; json?.data?.books?.forEach((novel) =>
json?.data?.books?.forEach((novel) => novels.push({
novels.push({ name: novel.name,
name: novel.name, cover: novel.coverImages[0].url,
cover: novel.coverImages[0].url, url: this.site + "/book/" + novel.slug,
url: this.site + "/book/" + novel.slug, }),
}), );
);
return novels;
return novels; }
} fetchImage = fetchFile;
fetchImage = fetchFile;
filters = {
filters = { sort: {
sort: { label: "Сортировка",
label: "Сортировка", value: "",
value: "", options: [
options: [ { label: "Бестселлеры", value: "bestseller" },
{ label: "Бестселлеры", value: "bestseller" }, { label: "Дате добавления", value: "newest" },
{ label: "Дате добавления", value: "newest" }, { label: "Дате обновления", value: "last-update" },
{ label: "Дате обновления", value: "last-update" }, ],
], type: FilterTypes.Picker,
type: FilterTypes.Picker, },
}, genres: {
genres: { label: "жанры",
label: "жанры", value: [],
value: [], options: [
options: [ { label: "Альтернативная история", value: "alternativnaya-istoriya" },
{ label: "Альтернативная история", value: "alternativnaya-istoriya" }, { label: "Боевая фантастика", value: "boevaya-fantastika" },
{ label: "Боевая фантастика", value: "boevaya-fantastika" }, { label: "Боевое фэнтези", value: "boevoe-fentezi" },
{ label: "Боевое фэнтези", value: "boevoe-fentezi" }, { label: "Бытовое фэнтези", value: "bytovoe-fentezi" },
{ label: "Бытовое фэнтези", value: "bytovoe-fentezi" }, { label: "Героическая фантастика", value: "geroicheskaya-fantastika" },
{ label: "Героическая фантастика", value: "geroicheskaya-fantastika" }, { label: "Героическое фэнтези", value: "geroicheskoe-fentezi" },
{ label: "Героическое фэнтези", value: "geroicheskoe-fentezi" }, { label: "Городское фэнтези", value: "gorodskoe-fentezi" },
{ label: "Городское фэнтези", value: "gorodskoe-fentezi" }, { label: "Детектив", value: "detektiv" },
{ label: "Детектив", value: "detektiv" }, { label: "Детективная фантастика", value: "detektivnaya-fantastika" },
{ label: "Детективная фантастика", value: "detektivnaya-fantastika" }, { label: "Жёсткая эротика", value: "zhyostkaya-erotika" },
{ label: "Жёсткая эротика", value: "zhyostkaya-erotika" }, { label: "Исторический детектив", value: "istoricheskii-detektiv" },
{ label: "Исторический детектив", value: "istoricheskii-detektiv" }, { label: "Исторический любовный роман", value: "istoricheskii-lyubovnyi-roman" },
{ label: "Исторический любовный роман", value: "istoricheskii-lyubovnyi-roman" }, { label: "Историческое фэнтези", value: "istoricheskoe-fentezi" },
{ label: "Историческое фэнтези", value: "istoricheskoe-fentezi" }, { label: "Киберпанк", value: "kiberpank" },
{ label: "Киберпанк", value: "kiberpank" }, { label: "Классический детектив", value: "klassicheskii-detektiv" },
{ label: "Классический детектив", value: "klassicheskii-detektiv" }, { label: "Короткий любовный роман", value: "korotkii-lyubovnyi-roman" },
{ label: "Короткий любовный роман", value: "korotkii-lyubovnyi-roman" }, { label: "Космическая фантастика", value: "kosmicheskaya-fantastika" },
{ label: "Космическая фантастика", value: "kosmicheskaya-fantastika" }, { label: "Криминальный детектив", value: "kriminalnyi-detektiv" },
{ label: "Криминальный детектив", value: "kriminalnyi-detektiv" }, { label: "ЛитРПГ", value: "litrpg" },
{ label: "ЛитРПГ", value: "litrpg" }, { label: "Любовная фантастика", value: "lyubovnaya-fantastika" },
{ label: "Любовная фантастика", value: "lyubovnaya-fantastika" }, { label: "Любовное фэнтези", value: "lyubovnoe-fentezi" },
{ label: "Любовное фэнтези", value: "lyubovnoe-fentezi" }, { label: "Любовный роман", value: "lyubovnyi-roman" },
{ label: "Любовный роман", value: "lyubovnyi-roman" }, { label: "Мистика", value: "mistika" },
{ label: "Мистика", value: "mistika" }, { label: "Молодежная проза", value: "molodezhnaya-proza" },
{ label: "Молодежная проза", value: "molodezhnaya-proza" }, { label: "Научная фантастика", value: "nauchnaya-fantastika" },
{ label: "Научная фантастика", value: "nauchnaya-fantastika" }, { label: "Остросюжетный любовный роман", value: "ostrosyuzhetnyi-lyubovnyi-roman" },
{ label: "Остросюжетный любовный роман", value: "ostrosyuzhetnyi-lyubovnyi-roman" }, { label: "Политический детектив", value: "politicheskii-detektiv" },
{ label: "Политический детектив", value: "politicheskii-detektiv" }, { label: "Попаданцы", value: "popadantsy" },
{ label: "Попаданцы", value: "popadantsy" }, { label: "Постапокалипсис", value: "postapokalipsis" },
{ label: "Постапокалипсис", value: "postapokalipsis" }, { label: "Приключенческое фэнтези", value: "priklyuchencheskoe-fentezi" },
{ label: "Приключенческое фэнтези", value: "priklyuchencheskoe-fentezi" }, { label: "Романтическая эротика", value: "romanticheskaya-erotika" },
{ label: "Романтическая эротика", value: "romanticheskaya-erotika" }, { label: "С элементами эротики", value: "s-elementami-erotiki" },
{ label: "С элементами эротики", value: "s-elementami-erotiki" }, { label: "Славянское фэнтези", value: "slavyanskoe-fentezi" },
{ label: "Славянское фэнтези", value: "slavyanskoe-fentezi" }, { label: "Современный любовный роман", value: "sovremennyi-lyubovnyi-roman" },
{ label: "Современный любовный роман", value: "sovremennyi-lyubovnyi-roman" }, { label: "Социальная фантастика", value: "sotsialnaya-fantastika" },
{ label: "Социальная фантастика", value: "sotsialnaya-fantastika" }, { label: "Тёмное фэнтези", value: "temnoe-fentezi" },
{ label: "Тёмное фэнтези", value: "temnoe-fentezi" }, { label: "Фантастика", value: "fantastika" },
{ label: "Фантастика", value: "fantastika" }, { label: "Фэнтези", value: "fentezi" },
{ label: "Фэнтези", value: "fentezi" }, { label: "Шпионский детектив", value: "shpionskii-detektiv" },
{ label: "Шпионский детектив", value: "shpionskii-detektiv" }, { label: "Эпическое фэнтези", value: "epicheskoe-fentezi" },
{ label: "Эпическое фэнтези", value: "epicheskoe-fentezi" }, { label: "Эротика", value: "erotika" },
{ label: "Эротика", value: "erotika" }, { label: "Эротическая фантастика", value: "eroticheskaya-fantastika" },
{ label: "Эротическая фантастика", value: "eroticheskaya-fantastika" }, { label: "Эротический фанфик", value: "eroticheskii-fanfik" },
{ label: "Эротический фанфик", value: "eroticheskii-fanfik" }, { label: "Эротическое фэнтези", value: "eroticheskoe-fentezi" },
{ label: "Эротическое фэнтези", value: "eroticheskoe-fentezi" }, { label: "Юмористический детектив", value: "yumoristicheskii-detektiv" },
{ label: "Юмористический детектив", value: "yumoristicheskii-detektiv" }, { label: "Юмористическое фэнтези", value: "yumoristicheskoe-fentezi" },
{ label: "Юмористическое фэнтези", value: "yumoristicheskoe-fentezi" }, ],
], type: FilterTypes.CheckboxGroup,
type: FilterTypes.CheckboxGroup, },
}, } satisfies Filters;
} satisfies Filters; }
} export default new Bookriver();
export default new Bookriver();
interface response {
interface response { props: {
props: { pageProps: {
pageProps: { state: {
state: { book?: {
book?: { bookPage: BooksEntity;
bookPage: BooksEntity; };
}; pagesFilter?: {
pagesFilter?: { genre: {
genre: { books: BooksEntity[];
books: BooksEntity[]; };
}; };
}; };
}; };
}; };
}; }
}
interface BooksEntity {
interface BooksEntity { name: string;
name: string; coverImages: { url: string }[];
coverImages: { url: string }[]; slug: string;
slug: string; annotation?: string;
annotation?: string; author?: {
author?: { name: string;
name: string; };
}; tags?: { name: string }[];
tags?: { name: string }[]; ebook?: {
ebook?: { chapters: Chapter[];
chapters: Chapter[]; };
}; statusComplete: string;
statusComplete: string; }
}
interface Chapter {
interface Chapter { name: string;
name: string; available: boolean;
available: boolean; firstPublishedAt?: Date | null;
firstPublishedAt?: Date | null; createdAt?: Date | null;
createdAt?: Date | null; chapterId: number | string;
chapterId: number | string; }
}
interface responseChapter {
interface responseChapter { data: {
data: { id: number;
id: number; bookId: number;
bookId: number; name: string;
name: string; content: string;
content: string; symbols: number;
symbols: number; number: number;
number: number; authorPages: number;
authorPages: number; createdAt: string;
createdAt: string; updatedAt: string;
updatedAt: string; firstPublishedAt: string;
firstPublishedAt: string; status: string;
status: string; protected: boolean;
protected: boolean; free: boolean;
free: boolean; audio?: {
audio?: { available: boolean;
available: boolean; url: string;
url: string; duration: number;
duration: number; };
}; publicationScheduledFor?: null;
publicationScheduledFor?: null; };
}; }
}
interface responseSearch {
interface responseSearch { data: Data;
data: Data; total: number;
total: number; }
} interface Data {
interface Data { books?: BooksEntity[] | null;
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 { Plugin } from "@typings/plugin";
import { FilterTypes, Filters } from "@libs/filterInputs"; import { FilterTypes, Filters } from "@libs/filterInputs";
import { fetchApi, fetchFile } from "@libs/fetch"; import { fetchApi, fetchFile } from "@libs/fetch";
import { NovelStatus } from "@libs/novelStatus"; import { NovelStatus } from "@libs/novelStatus";
import { load as parseHTML } from "cheerio"; import { load as parseHTML } from "cheerio";
class Jaomix implements Plugin.PluginBase { class Jaomix implements Plugin.PluginBase {
id = "jaomix.ru"; id = "jaomix.ru";
name = "Jaomix"; name = "Jaomix";
site = "https://jaomix.ru"; site = "https://jaomix.ru";
version = "1.0.0"; version = "1.0.0";
icon = "src/ru/jaomix/icon.png"; icon = "src/ru/jaomix/icon.png";
userAgent = ""; userAgent = "";
cookieString = "";
async popularNovels(
async popularNovels( pageNo: number,
pageNo: number, {
{ showLatestNovels,
showLatestNovels, filters,
filters, }: Plugin.PopularNovelsOptions<typeof this.filters>,
}: Plugin.PopularNovelsOptions<typeof this.filters>, ): Promise<Plugin.NovelItem[]> {
): Promise<Plugin.NovelItem[]> { let url = this.site + "/?searchrn";
let url = this.site + "/?searchrn";
if (filters?.lang?.value?.length) {
if (filters?.lang?.value?.length) { url += filters.lang.value
url += filters.lang.value .map((lang, idx) => `&lang[${idx}]=${lang}`).join("");
.map((lang, idx) => `&lang[${idx}]=${lang}`).join(""); }
}
if (filters?.genre?.value?.include?.length) {
if (filters?.genre?.value?.include?.length) { url += filters.genre.value.include
url += filters.genre.value.include .map((genre, idx) => `&genre[${idx}]=${genre}`).join("");
.map((genre, idx) => `&genre[${idx}]=${genre}`).join(""); }
}
if (filters?.genre?.value?.exclude?.length) {
if (filters?.genre?.value?.exclude?.length) { url += filters.genre.value.exclude
url += filters.genre.value.exclude .map((genre, idx) => `&delgenre[${idx}]=del ${genre}`).join("");
.map((genre, idx) => `&delgenre[${idx}]=del ${genre}`).join(""); }
}
url += "&sortcountchapt=" + (filters?.sortcountchapt?.value || "1");
url += "&sortcountchapt=" + (filters?.sortcountchapt?.value || "1"); url += "&sortdaycreate=" + (filters?.sortdaycreate?.value || "1");
url += "&sortdaycreate=" + (filters?.sortdaycreate?.value || "1"); url +=
url += "&sortby=" + (showLatestNovels ? "upd" : filters?.sortby?.value || "topweek");
"&sortby=" + (showLatestNovels ? "upd" : filters?.sortby?.value || "topweek"); url += "&gpage=" + pageNo;
url += "&gpage=" + pageNo;
const body = await fetchApi(url).then((res) => res.text());
const body = await fetchApi(url).then((res) => res.text()); const loadedCheerio = parseHTML(body);
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = [];
const novels: Plugin.NovelItem[] = []; loadedCheerio('div[class="block-home"] > div[class="one"]').each(
loadedCheerio('div[class="block-home"] > div[class="one"]').each( function () {
function () { const name = loadedCheerio(this)
const name = loadedCheerio(this) .find('div[class="img-home"] > a')
.find('div[class="img-home"] > a') .attr("title");
.attr("title"); const cover = loadedCheerio(this)
const cover = loadedCheerio(this) .find('div[class="img-home"] > a > img')
.find('div[class="img-home"] > a > img') .attr("src")
.attr("src") ?.replace("-150x150", "");
?.replace("-150x150", ""); const url = loadedCheerio(this)
const url = loadedCheerio(this) .find('div[class="img-home"] > a')
.find('div[class="img-home"] > a') .attr("href");
.attr("href");
if (!name || !url) return;
if (!name || !url) return;
novels.push({ name, cover, url });
novels.push({ name, cover, url }); },
}, );
);
return novels;
return novels; }
}
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> {
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> { const body = await fetchApi(novelUrl).then((res) => res.text());
const body = await fetchApi(novelUrl).then((res) => res.text()); const loadedCheerio = parseHTML(body);
const loadedCheerio = parseHTML(body);
const novel: Plugin.SourceNovel = {
const novel: Plugin.SourceNovel = { url: novelUrl,
url: novelUrl, name: loadedCheerio('div[class="desc-book"] > h1').text().trim(),
name: loadedCheerio('div[class="desc-book"] > h1').text().trim(), cover: loadedCheerio('div[class="img-book"] > img').attr("src"),
cover: loadedCheerio('div[class="img-book"] > img').attr("src"), summary: loadedCheerio('div[id="desc-tab"]').text().trim()
summary: loadedCheerio('div[id="desc-tab"]').text().trim() };
};
loadedCheerio("#info-book > p").each(function () {
loadedCheerio("#info-book > p").each(function () { let text = loadedCheerio(this).text().replace(/,/g, "").split(" ");
let text = loadedCheerio(this).text().replace(/,/g, "").split(" "); if (text[0] === "Автор:") {
if (text[0] === "Автор:") { novel.author = text.splice(1).join(" ");
novel.author = text.splice(1).join(" "); } else if (text[0] === "Жанры:") {
} else if (text[0] === "Жанры:") { novel.genres = text.splice(1).join(",");
novel.genres = text.splice(1).join(","); } else if (text[0] === "Статус:") {
} else if (text[0] === "Статус:") { novel.status = text.includes("продолжается")
novel.status = text.includes("продолжается") ? NovelStatus.Ongoing
? NovelStatus.Ongoing : NovelStatus.Completed;
: NovelStatus.Completed; }
} });
});
const chapters: Plugin.ChapterItem[] = [];
const chapters: Plugin.ChapterItem[] = [];
loadedCheerio(".download-chapter div.title").each(function () {
loadedCheerio(".download-chapter div.title").each(function () { const name = loadedCheerio(this).find("a").attr("title");
const name = loadedCheerio(this).find("a").attr("title"); const releaseTime = loadedCheerio(this).find("time").text();
const releaseTime = loadedCheerio(this).find("time").text(); const url = loadedCheerio(this).find("a").attr("href");
const url = loadedCheerio(this).find("a").attr("href"); if (!name || !url) return;
if (!name || !url) return;
chapters.push({ name, releaseTime, url });
chapters.push({ name, releaseTime, url }); });
});
novel.chapters = chapters.reverse();
novel.chapters = chapters.reverse(); return novel;
return novel; }
}
async parseChapter(chapterUrl: string): Promise<string> {
async parseChapter(chapterUrl: string): Promise<string> { const body = await fetchApi(chapterUrl).then((res) => res.text());
const body = await fetchApi(chapterUrl).then((res) => res.text()); const loadedCheerio = parseHTML(body);
const loadedCheerio = parseHTML(body);
loadedCheerio('div[class="adblock-service"]').remove();
loadedCheerio('div[class="adblock-service"]').remove(); const chapterText = loadedCheerio('div[class="entry-content"]').html();
const chapterText = loadedCheerio('div[class="entry-content"]').html();
return chapterText || "";
return chapterText || ""; }
}
async searchNovels(
async searchNovels( searchTerm: string,
searchTerm: string, pageNo: number | undefined = 1,
pageNo: number | undefined = 1, ): Promise<Plugin.NovelItem[]> {
): Promise<Plugin.NovelItem[]> { const url = `${this.site}/?searchrn=${searchTerm}&but=Поиск по названию&sortby=upd&gpage=${pageNo}`;
const url = `${this.site}/?searchrn=${searchTerm}&but=Поиск по названию&sortby=upd&gpage=${pageNo}`; const body = await fetchApi(url).then((res) => res.text());
const body = await fetchApi(url).then((res) => res.text()); const loadedCheerio = parseHTML(body);
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = [];
const novels: Plugin.NovelItem[] = []; loadedCheerio('div[class="block-home"] > div[class="one"]').each(
loadedCheerio('div[class="block-home"] > div[class="one"]').each( function () {
function () { const name = loadedCheerio(this)
const name = loadedCheerio(this) .find('div[class="img-home"] > a')
.find('div[class="img-home"] > a') .attr("title");
.attr("title"); const cover = loadedCheerio(this)
const cover = loadedCheerio(this) .find('div[class="img-home"] > a > img')
.find('div[class="img-home"] > a > img') .attr("src")
.attr("src") ?.replace("-150x150", "");
?.replace("-150x150", ""); const url = loadedCheerio(this)
const url = loadedCheerio(this) .find('div[class="img-home"] > a')
.find('div[class="img-home"] > a') .attr("href");
.attr("href");
if (!name || !url) return;
if (!name || !url) return;
novels.push({ name, cover, url });
novels.push({ name, cover, url }); },
}, );
);
return novels;
return novels; }
} fetchImage = fetchFile;
fetchImage = fetchFile;
filters = {
filters = { sortby: {
sortby: { label: "Сортировка:",
label: "Сортировка:", value: "topweek",
value: "topweek", options: [
options: [ { label: "Топ недели", value: "topweek" },
{ label: "Топ недели", value: "topweek" }, { label: "По алфавиту", value: "alphabet" },
{ label: "По алфавиту", value: "alphabet" }, { label: "По дате обновления", value: "upd" },
{ label: "По дате обновления", value: "upd" }, { label: "По дате создания", value: "new" },
{ label: "По дате создания", value: "new" }, { label: "По просмотрам", value: "count" },
{ label: "По просмотрам", value: "count" }, { label: "Топ года", value: "topyear" },
{ label: "Топ года", value: "topyear" }, { label: "Топ дня", value: "topday" },
{ label: "Топ дня", value: "topday" }, { label: "Топ за все время", value: "alltime" },
{ label: "Топ за все время", value: "alltime" }, { label: "Топ месяца", value: "topmonth" },
{ label: "Топ месяца", value: "topmonth" }, ],
], type: FilterTypes.Picker,
type: FilterTypes.Picker, },
}, sortdaycreate: {
sortdaycreate: { label: "Дата добавления:",
label: "Дата добавления:", value: "1",
value: "1", options: [
options: [ { label: "Любое", value: "1" },
{ label: "Любое", value: "1" }, { label: "От 120 до 180 дней", value: "1218" },
{ label: "От 120 до 180 дней", value: "1218" }, { label: "От 180 до 365 дней", value: "1836" },
{ label: "От 180 до 365 дней", value: "1836" }, { label: "От 30 до 60 дней", value: "3060" },
{ label: "От 30 до 60 дней", value: "3060" }, { label: "От 365 дней", value: "365" },
{ label: "От 365 дней", value: "365" }, { label: "От 60 до 90 дней", value: "6090" },
{ label: "От 60 до 90 дней", value: "6090" }, { label: "От 90 до 120 дней", value: "9012" },
{ label: "От 90 до 120 дней", value: "9012" }, { label: "Послед. 30 дней", value: "30" },
{ label: "Послед. 30 дней", value: "30" }, ],
], type: FilterTypes.Picker,
type: FilterTypes.Picker, },
}, sortcountchapt: {
sortcountchapt: { label: "Количество глав:",
label: "Количество глав:", value: "1",
value: "1", options: [
options: [ { label: "Любое кол-во глав", value: "1" },
{ label: "Любое кол-во глав", value: "1" }, { label: "До 500", value: "500" },
{ label: "До 500", value: "500" }, { label: "От 1000 до 2000", value: "1020" },
{ label: "От 1000 до 2000", value: "1020" }, { label: "От 2000 до 3000", value: "2030" },
{ label: "От 2000 до 3000", value: "2030" }, { label: "От 3000 до 4000", value: "3040" },
{ label: "От 3000 до 4000", value: "3040" }, { label: "От 4000", value: "400" },
{ label: "От 4000", value: "400" }, { label: "От 500 до 1000", value: "510" },
{ label: "От 500 до 1000", value: "510" }, ],
], type: FilterTypes.Picker,
type: FilterTypes.Picker, },
}, genre: {
genre: { label: "Жанры:",
label: "Жанры:", value: { include: [], exclude: [] },
value: { include: [], exclude: [] }, options: [
options: [ { label: "Боевые Искусства", value: "Боевые Искусства" },
{ label: "Боевые Искусства", value: "Боевые Искусства" }, { label: "Виртуальный Мир", value: "Виртуальный Мир" },
{ label: "Виртуальный Мир", value: "Виртуальный Мир" }, { label: "Гарем", value: "Гарем" },
{ label: "Гарем", value: "Гарем" }, { label: "Детектив", value: "Детектив" },
{ label: "Детектив", value: "Детектив" }, { label: "Драма", value: "Драма" },
{ label: "Драма", value: "Драма" }, { label: "Игра", value: "Игра" },
{ label: "Игра", value: "Игра" }, { label: "Истории из жизни", value: "Истории из жизни" },
{ label: "Истории из жизни", value: "Истории из жизни" }, { label: "Исторический", value: "Исторический" },
{ label: "Исторический", value: "Исторический" }, { label: "История", value: "История" },
{ label: "История", value: "История" }, { label: "Исэкай", value: "Исэкай" },
{ label: "Исэкай", value: "Исэкай" }, { label: "Комедия", value: "Комедия" },
{ label: "Комедия", value: "Комедия" }, { label: "Меха", value: "Меха" },
{ label: "Меха", value: "Меха" }, { label: "Мистика", value: "Мистика" },
{ label: "Мистика", value: "Мистика" }, { label: "Научная Фантастика", value: "Научная Фантастика" },
{ label: "Научная Фантастика", value: "Научная Фантастика" }, { label: "Повседневность", value: "Повседневность" },
{ label: "Повседневность", value: "Повседневность" }, { label: "Постапокалипсис", value: "Постапокалипсис" },
{ label: "Постапокалипсис", value: "Постапокалипсис" }, { label: "Приключения", value: "Приключения" },
{ label: "Приключения", value: "Приключения" }, { label: "Психология", value: "Психология" },
{ label: "Психология", value: "Психология" }, { label: "Романтика", value: "Романтика" },
{ label: "Романтика", value: "Романтика" }, { label: "Сверхъестественное", value: "Сверхъестественное" },
{ label: "Сверхъестественное", value: "Сверхъестественное" }, { label: "Сёнэн", 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: "Adult", value: "Adult" }, { label: "Ecchi", value: "Ecchi" },
{ label: "Ecchi", value: "Ecchi" }, { label: "Josei", value: "Josei" },
{ label: "Josei", value: "Josei" }, { label: "Lolicon", value: "Lolicon" },
{ label: "Lolicon", value: "Lolicon" }, { label: "Mature", value: "Mature" },
{ label: "Mature", value: "Mature" }, { label: "Shoujo", value: "Shoujo" },
{ label: "Shoujo", value: "Shoujo" }, { label: "Wuxia", value: "Wuxia" },
{ label: "Wuxia", value: "Wuxia" }, { label: "Xianxia", value: "Xianxia" },
{ label: "Xianxia", value: "Xianxia" }, { label: "Xuanhuan", value: "Xuanhuan" },
{ label: "Xuanhuan", value: "Xuanhuan" }, { label: "Yaoi", value: "Yaoi" },
{ label: "Yaoi", value: "Yaoi" }, ],
], type: FilterTypes.ExcludableCheckboxGroup,
type: FilterTypes.ExcludableCheckboxGroup, },
}, lang: {
lang: { label: "Выбрать языки:",
label: "Выбрать языки:", value: [],
value: [], options: [
options: [ { label: "Английский", value: "Английский" },
{ label: "Английский", value: "Английский" }, { label: "Китайский", value: "Китайский" },
{ label: "Китайский", value: "Китайский" }, { label: "Корейский", value: "Корейский" },
{ label: "Корейский", value: "Корейский" }, { label: "Японский", value: "Японский" },
{ label: "Японский", value: "Японский" }, ],
], type: FilterTypes.CheckboxGroup,
type: FilterTypes.CheckboxGroup, },
}, } satisfies Filters;
} satisfies Filters; }
}
export default new Jaomix();
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