Fix(plugins): novelovh, zelluloza (#943)

* fix

* xd
This commit is contained in:
Rider21
2024-05-21 09:41:11 +03:00
committed by GitHub
parent 74d81b2ff2
commit 89d4d2471f
8 changed files with 37 additions and 52 deletions
+6 -8
View File
@@ -10,7 +10,7 @@ class Zelluloza implements Plugin.PluginBase {
id = 'zelluloza';
name = 'Целлюлоза';
site = 'https://zelluloza.ru';
version = '1.0.0';
version = '1.0.1';
icon = 'src/ru/zelluloza/icon.png';
async popularNovels(
@@ -40,15 +40,14 @@ class Zelluloza implements Plugin.PluginBase {
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = [];
loadedCheerio('div[style="display: flex"]').each((index, element) => {
loadedCheerio('div[style="display: flex;"]').each((index, element) => {
novels.push({
name: loadedCheerio(element).find('span[itemprop="name"]').text() || '',
cover:
this.site +
loadedCheerio(element).find('img[class="shadow"]').attr('src'),
path: (
loadedCheerio(element).find('img[class="shadow"]').attr('onclick') ||
''
loadedCheerio(element).find('a[class="txt"]').attr('href') || ''
).replace(/\D/g, ''),
});
});
@@ -64,7 +63,7 @@ class Zelluloza implements Plugin.PluginBase {
const novel: Plugin.SourceNovel = {
path: novelPath,
name: loadedCheerio('span[itemprop="name"]').text(),
name: loadedCheerio('h2[class="bookname"]').text().trim(),
cover: this.site + loadedCheerio('img[class="shadow"]').attr('src'),
genres: loadedCheerio('.gnres').text()?.split?.(': ')?.[1],
summary:
@@ -163,15 +162,14 @@ class Zelluloza implements Plugin.PluginBase {
const loadedCheerio = parseHTML(body);
const novels: Plugin.NovelItem[] = [];
loadedCheerio('div[style="display: flex"]').each((index, element) => {
loadedCheerio('div[style="display: flex;"]').each((index, element) => {
novels.push({
name: loadedCheerio(element).find('span[itemprop="name"]').text() || '',
cover:
this.site +
loadedCheerio(element).find('img[class="shadow"]').attr('src'),
path: (
loadedCheerio(element).find('img[class="shadow"]').attr('onclick') ||
''
loadedCheerio(element).find('a[class="txt"]').attr('href') || ''
).replace(/\D/g, ''),
});
});