add VyNovel (#1036)

* add VyNovel

* Update vynovel.ts

* fix
This commit is contained in:
Rider21
2024-07-12 17:53:00 +03:00
committed by GitHub
parent 25905e7ca0
commit bd6f6a7ed9
7 changed files with 195 additions and 10 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ class HotNovelPubPlugin implements Plugin.PluginBase {
);
let chapterText =
body.match(/<div id="content-item" ([\s\S]*?)<\/div>/g)?.[0] || '';
body.match(/<div id="content-item" ([\s\S]*?)<\/div>/)?.[0] || '';
if (chapterText) {
const result = await fetchApi(
+1 -1
View File
@@ -140,7 +140,7 @@ class IfreedomPlugin implements Plugin.PluginBase {
res.text(),
);
let chapterText =
body.match(/<article id="([\s\S]*?)<\/article>/g)?.[0] || '';
body.match(/<article id="([\s\S]*?)<\/article>/)?.[0] || '';
chapterText = chapterText.replace(/<script[^>]*>[\s\S]*?<\/script>/gim, '');
if (chapterText.includes('<img')) {