Skip to content

Commit

Permalink
FWN: better regex + another case (#1207)
Browse files Browse the repository at this point in the history
* FWN: better regex + another case

* lint

* forgot last case
  • Loading branch information
Palloxin authored Dec 1, 2024
1 parent fe87acc commit 256bb18
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/plugins/english/freewebnovel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,10 @@ class FreeWebNovel implements Plugin.PluginBase {
const chapterText = loadedCheerio('div.txt').html() || '';
return chapterText
.replace(
/(?:(?<=<p>\s*)(?:This (?:chapter is updated by|content is taken from)|Follow current novels on) )?[ƒfF][Rrɾг][Eēeё][Eēёe][Wwω][Eёēe][Bbɓ][Nnɳη][Oø૦ѳσo][Vѵv][Eёeē][Llℓɭ]\.\s?[Cƈcç][O૦σøoѳ][M๓ɱm]\.?/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,
'<p>',
)
.replace(
/(?<=<p>\s*)Visit for the best novel reading experience\.?/g,
'',
);
.replace(/<p>\s*Visit for the best novel reading experience\.?/g, '<p>');
}

async searchNovels(searchTerm: string): Promise<Plugin.NovelItem[]> {
Expand Down

0 comments on commit 256bb18

Please sign in to comment.