Fix novel info from mvlempyr (#1579)

This commit is contained in:
CosmoRing
2025-03-16 01:17:09 +00:00
committed by GitHub
parent ea7965bdda
commit f7ce59322a
+17 -8
View File
@@ -29,7 +29,7 @@ class MVLEMPYRPlugin implements Plugin.PluginBase {
name = 'MVLEMPYR'; name = 'MVLEMPYR';
icon = 'src/en/mvlempyr/icon.png'; icon = 'src/en/mvlempyr/icon.png';
site = 'https://www.mvlempyr.com/'; site = 'https://www.mvlempyr.com/';
version = '1.0.4'; version = '1.0.5';
_chapSite = 'https://chp.mvlempyr.net/'; _chapSite = 'https://chp.mvlempyr.net/';
_allNovels: (Plugin.NovelItem & ExtraNovelData)[] | undefined; _allNovels: (Plugin.NovelItem & ExtraNovelData)[] | undefined;
@@ -341,19 +341,28 @@ class MVLEMPYRPlugin implements Plugin.PluginBase {
return { return {
path: novelPath, path: novelPath,
name: name:
loadedCheerio('div.image-container.w-embed > img').attr('alt') || loadedCheerio(
'Untitled', '.novelpaewrapper div.image-container.w-embed > img',
cover: loadedCheerio('div.image-container.w-embed > img').attr('src'), ).attr('alt') || 'Untitled',
summary: loadedCheerio('div.synopsis.w-richtext').text().trim(), cover: loadedCheerio(
'.novelpaewrapper div.image-container.w-embed > img',
).attr('src'),
summary: loadedCheerio('.novelpaewrapper div.synopsis.w-richtext')
.text()
.trim(),
chapters: posts.map(chap => ({ chapters: posts.map(chap => ({
name: chap.acf.ch_name, name: chap.acf.ch_name,
path: 'chapter/' + chap.acf.novel_code + '-' + chap.acf.chapter_number, path: 'chapter/' + chap.acf.novel_code + '-' + chap.acf.chapter_number,
releaseTime: chap.date, releaseTime: chap.date,
chapterNumber: chap.acf.chapter_number, chapterNumber: chap.acf.chapter_number,
})), })),
status: loadedCheerio('div.novelstatustextmedium').text(), status: loadedCheerio(
author: loadedCheerio('div.mobileauthorname').text(), '.novelpaewrapper div.novelstatustextmedium',
genres: loadedCheerio('div.novelgenre.mobile > div > div > a > div') ).text(),
author: loadedCheerio('.novelpaewrapper div.mobileauthorname').text(),
genres: loadedCheerio(
'.novelpaewrapper div.novelgenre.mobile > div > div > a > div',
)
.map((i, el) => loadedCheerio(el).text()) .map((i, el) => loadedCheerio(el).text())
.toArray() .toArray()
.join(','), .join(','),