fix: Remove Tags From Text (#1972)

* Fix (novelfire): Remove plugs

* Fix (novelfire): Remove plugs 2.0
This commit is contained in:
Rojikku
2026-01-10 00:49:30 -05:00
committed by GitHub
parent e7d99bec2a
commit 26a0f25b3d
+8 -3
View File
@@ -8,7 +8,7 @@ import { defaultCover } from '@/types/constants';
class NovelFire implements Plugin.PluginBase { class NovelFire implements Plugin.PluginBase {
id = 'novelfire'; id = 'novelfire';
name = 'Novel Fire'; name = 'Novel Fire';
version = '1.1.4'; version = '1.1.5';
icon = 'src/en/novelfire/icon.png'; icon = 'src/en/novelfire/icon.png';
site = 'https://novelfire.net/'; site = 'https://novelfire.net/';
@@ -195,8 +195,13 @@ class NovelFire implements Plugin.PluginBase {
const loadedCheerio = await this.getCheerio(url, false); const loadedCheerio = await this.getCheerio(url, false);
const chapterText = loadedCheerio('#content'); const chapterText = loadedCheerio('#content');
const odds = chapterText.find(':not(p, h1, span, i, b, u, img, a, div)');
loadedCheerio(chapterText).find('div').remove(); for (const ele of odds.toArray()) {
const tag = ele.name.toString();
if (tag.length > 5) {
loadedCheerio(ele).remove();
}
}
return chapterText.html()?.replace(/ /g, ' ') || ''; return chapterText.html()?.replace(/ /g, ' ') || '';
} }