update fwb spam removal (#1547)
* Update fwb * Update freewebnovel.ts * lint * lint * lint * lint * lint
This commit is contained in:
@@ -7,11 +7,11 @@ class FreeWebNovel implements Plugin.PluginBase {
|
|||||||
id = 'FWN.com';
|
id = 'FWN.com';
|
||||||
name = 'Free Web Novel';
|
name = 'Free Web Novel';
|
||||||
site = 'https://freewebnovel.com/';
|
site = 'https://freewebnovel.com/';
|
||||||
version = '1.1.2';
|
version = '1.1.3';
|
||||||
icon = 'src/en/freewebnovel/icon.png';
|
icon = 'src/en/freewebnovel/icon.png';
|
||||||
|
|
||||||
lastSearch: number | null = null;
|
lastSearch: number | null = null;
|
||||||
searchInterval = 3200;
|
searchInterval = 3400;
|
||||||
|
|
||||||
async sleep(ms: number) {
|
async sleep(ms: number) {
|
||||||
return new Promise(resolve => setTimeout(resolve, ms));
|
return new Promise(resolve => setTimeout(resolve, ms));
|
||||||
@@ -122,12 +122,10 @@ class FreeWebNovel implements Plugin.PluginBase {
|
|||||||
loadedCheerio('div.txt').find('p:last-child').remove();
|
loadedCheerio('div.txt').find('p:last-child').remove();
|
||||||
|
|
||||||
const chapterText = loadedCheerio('div.txt').html() || '';
|
const chapterText = loadedCheerio('div.txt').html() || '';
|
||||||
return chapterText
|
return chapterText.replace(
|
||||||
.replace(
|
/>([^<\.]+?\.)?[^\.<]*?\b[ƒfF][Rrɾг][Eēeё]+[Wwω𝑤]+[Eёēe][Bbɓ][Nnɳη][Oø૦ѳσo][Vѵνv][Eёeē][^<]*/g,
|
||||||
/<p>\s*(?:(?:This (?:chapter is updated by|content is taken from)|Follow current novels on|Updated from) )?(?:[ƒfF][Rrɾг][Eēeё][Eēёe][Wwω][Eёēe][Bbɓ][Nnɳη][Oø૦ѳσo][Vѵv][Eёeē][LlℓɭI\|]\.\s?[Cƈcç][O૦σøoѳ][M๓ɱm]|ꜰʀᴇᴇᴡᴇʙɴᴏᴠᴇʟ)\.?/g,
|
'>$1',
|
||||||
'<p>',
|
);
|
||||||
)
|
|
||||||
.replace(/<p>\s*Visit for the best novel reading experience\.?/g, '<p>');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async searchNovels(searchTerm: string): Promise<Plugin.NovelItem[]> {
|
async searchNovels(searchTerm: string): Promise<Plugin.NovelItem[]> {
|
||||||
|
|||||||
Reference in New Issue
Block a user