add NovelTrench (#9)

* add NovelTrench

* add icon
This commit is contained in:
Rajarshee Chatterjee
2021-05-04 08:19:54 +05:30
committed by GitHub
parent a3babada47
commit 99bfadd60b
6 changed files with 223 additions and 3 deletions
+3 -3
View File
@@ -1,5 +1,6 @@
const cheerio = require("cheerio");
const fetch = require("node-fetch");
const { htmlToText } = require("html-to-text");
const baseUrl = "https://www.wuxiaworld.com/";
@@ -115,9 +116,8 @@ const chapterScraper = async (req, res) => {
$("#chapter-content > script").remove();
const chapterText = $("#chapter-content")
.html()
.replace(/<(?:.|\n)*?>/gm, "\n");
let chapterText = $("#chapter-content").html();
chapterText = htmlToText(chapterText);
let nextChapter = null;