From 7f857f8be154ce89e75e38eced5a4ff71b55ff6b Mon Sep 17 00:00:00 2001 From: Palloxin <75091899+Palloxin@users.noreply.github.com> Date: Wed, 5 Mar 2025 04:21:12 +0100 Subject: [PATCH 1/7] Update fwb --- src/plugins/english/freewebnovel.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/plugins/english/freewebnovel.ts b/src/plugins/english/freewebnovel.ts index 2d2bfd0b1..234fc40eb 100644 --- a/src/plugins/english/freewebnovel.ts +++ b/src/plugins/english/freewebnovel.ts @@ -7,11 +7,11 @@ class FreeWebNovel implements Plugin.PluginBase { id = 'FWN.com'; name = 'Free Web Novel'; site = 'https://freewebnovel.com/'; - version = '1.1.2'; + version = '1.1.3'; icon = 'src/en/freewebnovel/icon.png'; lastSearch: number | null = null; - searchInterval = 3200; + searchInterval = 3400; async sleep(ms: number) { return new Promise(resolve => setTimeout(resolve, ms)); @@ -123,11 +123,8 @@ class FreeWebNovel implements Plugin.PluginBase { const chapterText = loadedCheerio('div.txt').html() || ''; return chapterText - .replace( - /

\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, - '

', - ) - .replace(/

\s*Visit for the best novel reading experience\.?/g, '

'); + .replace(/>([^<\.]+?\.)?[^\.<]*\s*[ƒfF][Rrɾг][Eēeё]+[Wwω𝑤]+[Eёēe][Bbɓ][Nnɳη][Oø૦ѳσo][Vѵνv][Eёeē][^<]*/, '>$1'), + ); } async searchNovels(searchTerm: string): Promise { From 3d1fd52acf4b39558cb0369f5845a369e8cc70d4 Mon Sep 17 00:00:00 2001 From: Palloxin <75091899+Palloxin@users.noreply.github.com> Date: Wed, 5 Mar 2025 04:45:32 +0100 Subject: [PATCH 2/7] Update freewebnovel.ts --- src/plugins/english/freewebnovel.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/english/freewebnovel.ts b/src/plugins/english/freewebnovel.ts index 234fc40eb..bcda111ee 100644 --- a/src/plugins/english/freewebnovel.ts +++ b/src/plugins/english/freewebnovel.ts @@ -123,7 +123,7 @@ class FreeWebNovel implements Plugin.PluginBase { const chapterText = loadedCheerio('div.txt').html() || ''; return chapterText - .replace(/>([^<\.]+?\.)?[^\.<]*\s*[ƒfF][Rrɾг][Eēeё]+[Wwω𝑤]+[Eёēe][Bbɓ][Nnɳη][Oø૦ѳσo][Vѵνv][Eёeē][^<]*/, '>$1'), + .replace(/>([^<\.]+?\.)?[^\.<]*?\b[ƒfF][Rrɾг][Eēeё]+[Wwω𝑤]+[Eёēe][Bbɓ][Nnɳη][Oø૦ѳσo][Vѵνv][Eёeē][^<]*/, '>$1'), ); } From fe7c545416dfcba97eda82cf02fe6fc7d080df38 Mon Sep 17 00:00:00 2001 From: Palloxin <75091899+Palloxin@users.noreply.github.com> Date: Wed, 5 Mar 2025 04:49:31 +0100 Subject: [PATCH 3/7] lint --- src/plugins/english/freewebnovel.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/english/freewebnovel.ts b/src/plugins/english/freewebnovel.ts index bcda111ee..f7d13d3e3 100644 --- a/src/plugins/english/freewebnovel.ts +++ b/src/plugins/english/freewebnovel.ts @@ -123,7 +123,9 @@ class FreeWebNovel implements Plugin.PluginBase { const chapterText = loadedCheerio('div.txt').html() || ''; return chapterText - .replace(/>([^<\.]+?\.)?[^\.<]*?\b[ƒfF][Rrɾг][Eēeё]+[Wwω𝑤]+[Eёēe][Bbɓ][Nnɳη][Oø૦ѳσo][Vѵνv][Eёeē][^<]*/, '>$1'), + .replace( + />([^<\.]+?\.)?[^\.<]*?\b[ƒfF][Rrɾг][Eēeё]+[Wwω𝑤]+[Eёēe][Bbɓ][Nnɳη][Oø૦ѳσo][Vѵνv][Eёeē][^<]*/g, + '>$1', ); } From 5a77b1fd65e62fdb4739377d2fedfe8029297bc8 Mon Sep 17 00:00:00 2001 From: Palloxin <75091899+Palloxin@users.noreply.github.com> Date: Wed, 5 Mar 2025 04:56:10 +0100 Subject: [PATCH 4/7] lint From a2f138575d573b6afa883486d4416ac2d8a8456e Mon Sep 17 00:00:00 2001 From: Palloxin <75091899+Palloxin@users.noreply.github.com> Date: Wed, 5 Mar 2025 05:07:51 +0100 Subject: [PATCH 5/7] lint --- src/plugins/english/freewebnovel.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/plugins/english/freewebnovel.ts b/src/plugins/english/freewebnovel.ts index f7d13d3e3..ead63831a 100644 --- a/src/plugins/english/freewebnovel.ts +++ b/src/plugins/english/freewebnovel.ts @@ -14,7 +14,7 @@ class FreeWebNovel implements Plugin.PluginBase { searchInterval = 3400; async sleep(ms: number) { - return new Promise(resolve => setTimeout(resolve, ms)); + return new Promise((resolve) => setTimeout(resolve, ms)); } async getCheerio(url: string): Promise { @@ -31,11 +31,10 @@ class FreeWebNovel implements Plugin.PluginBase { .map((index, element) => ({ name: loadedCheerio(element).find('.tit').text() || '', cover: this.site + loadedCheerio(element).find('img').attr('src'), - path: - loadedCheerio(element).find('h3 > a').attr('href')?.slice(1) || '', + path: loadedCheerio(element).find('h3 > a').attr('href')?.slice(1) || '', })) .get() - .filter(novel => novel.name && novel.path); + .filter((novel) => novel.name && novel.path); } async popularNovels( @@ -122,11 +121,10 @@ class FreeWebNovel implements Plugin.PluginBase { loadedCheerio('div.txt').find('p:last-child').remove(); const chapterText = loadedCheerio('div.txt').html() || ''; - return chapterText - .replace( - />([^<\.]+?\.)?[^\.<]*?\b[ƒfF][Rrɾг][Eēeё]+[Wwω𝑤]+[Eёēe][Bbɓ][Nnɳη][Oø૦ѳσo][Vѵνv][Eёeē][^<]*/g, - '>$1', - ); + return chapterText.replace( + />([^<\.]+?\.)?[^\.<]*?\b[ƒfF][Rrɾг][Eēeё]+[Wwω𝑤]+[Eёēe][Bbɓ][Nnɳη][Oø૦ѳσo][Vѵνv][Eёeē][^<]*/g, + '>$1', + ); } async searchNovels(searchTerm: string): Promise { From 37d5004f3257379199820d309e1f210bea3e9114 Mon Sep 17 00:00:00 2001 From: Palloxin <75091899+Palloxin@users.noreply.github.com> Date: Wed, 5 Mar 2025 05:11:42 +0100 Subject: [PATCH 6/7] lint --- src/plugins/english/freewebnovel.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/plugins/english/freewebnovel.ts b/src/plugins/english/freewebnovel.ts index ead63831a..13c0e9773 100644 --- a/src/plugins/english/freewebnovel.ts +++ b/src/plugins/english/freewebnovel.ts @@ -14,7 +14,7 @@ class FreeWebNovel implements Plugin.PluginBase { searchInterval = 3400; async sleep(ms: number) { - return new Promise((resolve) => setTimeout(resolve, ms)); + return new Promise(resolve => setTimeout(resolve, ms)); } async getCheerio(url: string): Promise { @@ -31,10 +31,11 @@ class FreeWebNovel implements Plugin.PluginBase { .map((index, element) => ({ name: loadedCheerio(element).find('.tit').text() || '', cover: this.site + loadedCheerio(element).find('img').attr('src'), - path: loadedCheerio(element).find('h3 > a').attr('href')?.slice(1) || '', + path: + loadedCheerio(element).find('h3 > a').attr('href')?.slice(1) || '', })) .get() - .filter((novel) => novel.name && novel.path); + .filter(novel => novel.name && novel.path); } async popularNovels( @@ -122,9 +123,9 @@ class FreeWebNovel implements Plugin.PluginBase { const chapterText = loadedCheerio('div.txt').html() || ''; return chapterText.replace( - />([^<\.]+?\.)?[^\.<]*?\b[ƒfF][Rrɾг][Eēeё]+[Wwω𝑤]+[Eёēe][Bbɓ][Nnɳη][Oø૦ѳσo][Vѵνv][Eёeē][^<]*/g, - '>$1', - ); + />([^<\.]+?\.)?[^\.<]*?\b[ƒfF][Rrɾг][Eēeё]+[Wwω𝑤]+[Eёēe][Bbɓ][Nnɳη][Oø૦ѳσo][Vѵνv][Eёeē][^<]*/g, + '>$1', + ); } async searchNovels(searchTerm: string): Promise { From 2436c19412216b4424197961fa2be9080451af87 Mon Sep 17 00:00:00 2001 From: Palloxin <75091899+Palloxin@users.noreply.github.com> Date: Wed, 5 Mar 2025 05:24:55 +0100 Subject: [PATCH 7/7] lint --- src/plugins/english/freewebnovel.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/english/freewebnovel.ts b/src/plugins/english/freewebnovel.ts index 13c0e9773..902c5ba9a 100644 --- a/src/plugins/english/freewebnovel.ts +++ b/src/plugins/english/freewebnovel.ts @@ -123,9 +123,9 @@ class FreeWebNovel implements Plugin.PluginBase { const chapterText = loadedCheerio('div.txt').html() || ''; return chapterText.replace( - />([^<\.]+?\.)?[^\.<]*?\b[ƒfF][Rrɾг][Eēeё]+[Wwω𝑤]+[Eёēe][Bbɓ][Nnɳη][Oø૦ѳσo][Vѵνv][Eёeē][^<]*/g, - '>$1', - ); + />([^<\.]+?\.)?[^\.<]*?\b[ƒfF][Rrɾг][Eēeё]+[Wwω𝑤]+[Eёēe][Bbɓ][Nnɳη][Oø૦ѳσo][Vѵνv][Eёeē][^<]*/g, + '>$1', + ); } async searchNovels(searchTerm: string): Promise {