diff --git a/src/sources/en/fastnovel.js b/src/sources/en/fastnovel.js
index 1d3ee069..057ae9e0 100644
--- a/src/sources/en/fastnovel.js
+++ b/src/sources/en/fastnovel.js
@@ -14,7 +14,7 @@ const popularNovels = async page => {
let novels = [];
- loadedCheerio('.list-novel .row').each(function () {
+ loadedCheerio('.col-novel-main .list-novel .row').each(function () {
const novelName = loadedCheerio(this).find('h3.novel-title > a').text();
const novelCover = loadedCheerio(this).find('img.cover').attr('src');
const novelUrl = loadedCheerio(this)
@@ -53,28 +53,26 @@ const parseNovelAndChapters = async novelUrl => {
novel.summary = loadedCheerio('div.desc-text').text().trim();
- novel.author = loadedCheerio('ul.info > li > h3')
- .filter(function () {
- return loadedCheerio(this).text().trim() === 'Author:';
- })
- .siblings()
- .text();
- novel.genre = loadedCheerio('ul.info > li')
- .filter(function () {
- return loadedCheerio(this).find('h3').text().trim() === 'Genre:';
- })
- .text()
- .trim()
- .replace('Genre:', '')
- .trim();
-
- novel.status = loadedCheerio('ul.info > li > h3')
- .filter(function () {
- return loadedCheerio(this).text().trim() === 'Status:';
- })
- .next()
- .text();
+ loadedCheerio('ul.info > li > h3').each(function () {
+ let detailName = loadedCheerio(this).text();
+ let detail = loadedCheerio(this)
+ .siblings()
+ .map((i, el) => loadedCheerio(el).text())
+ .toArray()
+ .join(',');
+ switch (detailName) {
+ case 'Author:':
+ novel.author = detail;
+ break;
+ case 'Status:':
+ novel.status = detail;
+ break;
+ case 'Genre:':
+ novel.genre = detail;
+ break;
+ }
+ });
const novelId = loadedCheerio('#rating').attr('data-novel-id');
const getChapters = async id => {
@@ -119,6 +117,7 @@ const parseChapter = async (novelUrl, chapterUrl) => {
const chapterName = loadedCheerio('.chr-text').text();
+ loadedCheerio('#chr-content > div,h6,p[style="display: none;"]').remove();
let chapterText = loadedCheerio('#chr-content').html();
const chapter = {
sourceId,
@@ -139,14 +138,13 @@ const searchNovels = async searchTerm => {
let novels = [];
- loadedCheerio('div.col-novel-main > div.list-novel > .row').each(function () {
+ loadedCheerio('.col-novel-main .list-novel .row').each(function () {
+ const novelName = loadedCheerio(this).find('h3.novel-title > a').text();
+ const novelCover = loadedCheerio(this).find('img').attr('src');
const novelUrl = loadedCheerio(this)
.find('h3.novel-title > a')
.attr('href');
- const novelName = loadedCheerio(this).find('h3.novel-title > a').text();
- const novelCover = loadedCheerio(this).find('img').attr('src');
-
if (novelUrl) {
novels.push({
sourceId,
diff --git a/src/sources/en/novelupdates.js b/src/sources/en/novelupdates.js
index 045b12fc..63b092bc 100644
--- a/src/sources/en/novelupdates.js
+++ b/src/sources/en/novelupdates.js
@@ -263,10 +263,11 @@ const parseChapter = async (novelUrl, chapterUrl) => {
url: link,
sourceId,
}).then(r => r.json());
- chapterText =
- json.content.replace(/\n/g, '
') +
- '