diff --git a/plugins/english/novelupdates.ts b/plugins/english/novelupdates.ts
index ce2025e..9270b8a 100644
--- a/plugins/english/novelupdates.ts
+++ b/plugins/english/novelupdates.ts
@@ -6,7 +6,7 @@ import { Plugin } from '@typings/plugin';
class NovelUpdates implements Plugin.PluginBase {
id = 'novelupdates';
name = 'Novel Updates';
- version = '0.5.3';
+ version = '0.5.4';
icon = 'src/en/novelupdates/icon.png';
site = 'https://www.novelupdates.com/';
@@ -180,6 +180,7 @@ class NovelUpdates implements Plugin.PluginBase {
loadedCheerio: CheerioAPI,
domain: string[],
url: string,
+ result: Response,
) {
let bloatClasses = [];
let chapterTitle = '';
@@ -206,6 +207,25 @@ class NovelUpdates implements Plugin.PluginBase {
chapterText = `
${chapterTitle}
${chapterContent}`;
}
break;
+ case 'helscans':
+ chapterTitle = loadedCheerio('.entry-title-main').first().text()!;
+ const chapterStringHelScans =
+ 'Chapter ' + chapterTitle.split('Chapter')[1].trim();
+ loadedCheerio('#readerarea.rdminimal')
+ .children()
+ .each((idx, ele) => {
+ let elementText = loadedCheerio(ele).text();
+ if (elementText.includes(chapterStringHelScans)) {
+ chapterTitle = elementText;
+ loadedCheerio(ele).remove();
+ return false;
+ }
+ });
+ chapterContent = loadedCheerio('#readerarea.rdminimal').html()!;
+ if (chapterTitle && chapterContent) {
+ chapterText = `${chapterTitle}
${chapterContent}`;
+ }
+ break;
case 'hiraethtranslation':
chapterTitle = loadedCheerio('li.active').first().text()!;
chapterContent = loadedCheerio('.text-left').html()!;
@@ -263,10 +283,22 @@ class NovelUpdates implements Plugin.PluginBase {
}
break;
case 'novelworldtranslations':
- bloatClasses = ['.separator', 'p[dir="ltr"]'];
+ bloatClasses = ['.separator img'];
bloatClasses.map(tag => loadedCheerio(tag).remove());
+ loadedCheerio('.entry-content a')
+ .filter((_, el) => {
+ return (
+ loadedCheerio(el)
+ .attr('href')
+ ?.includes('https://novelworldtranslations.blogspot.com') ||
+ false
+ );
+ })
+ .each((_, el) => {
+ loadedCheerio(el).parent().remove();
+ });
chapterTitle = loadedCheerio('.entry-title').first().text()!;
- chapterContent = loadedCheerio('.entry-content p span span')
+ chapterContent = loadedCheerio('.entry-content')
.html()!
.replace(/ /g, '')
.replace(/\n/g, '
');
@@ -334,6 +366,25 @@ class NovelUpdates implements Plugin.PluginBase {
chapterText = `${chapterTitle}
${chapterContent}`;
}
break;
+ case 'skydemonorder':
+ /**
+ * Check for age verification
+ */
+ const ageVerification = loadedCheerio('main').text().toLowerCase()!;
+ if (ageVerification.includes('age verification required')) {
+ throw new Error('Age verification required, please open in webview.');
+ }
+ chapterTitle = `${loadedCheerio('.pl-4 h1').first().text()!} | ${loadedCheerio('.pl-4 div').first().text()!}`;
+ chapterContent = loadedCheerio('#startContainer + * > *')
+ .first()
+ .html()!;
+ if (!chapterContent) {
+ chapterContent = `${loadedCheerio('#chapter-body').html()!}
There could be missing content, please check in webview.`;
+ }
+ if (chapterTitle && chapterContent) {
+ chapterText = `${chapterTitle}
${chapterContent}`;
+ }
+ break;
case 'stabbingwithasyringe':
/**
* Get the chapter link from the main page
@@ -437,6 +488,28 @@ class NovelUpdates implements Plugin.PluginBase {
const loadedCheerio = parseHTML(body);
+ /**
+ * Check for Captcha
+ */
+ const title = loadedCheerio('title').text().toLowerCase().trim();
+ if (
+ title == 'bot verification' ||
+ title == 'just a moment...' ||
+ title == 'redirecting...' ||
+ title == 'un instant...' ||
+ title == 'you are being redirected...'
+ ) {
+ throw new Error('Captcha error, please open in webview.');
+ }
+ if (!result.ok) {
+ /**
+ * Check if the chapter url is wrong or the site is genuinely down
+ */
+ throw new Error(
+ `Could not reach site (${result.status}), try to open in webview.`,
+ );
+ }
+
/**
* Detect if the site is a Blogspot site
*/
@@ -477,6 +550,7 @@ class NovelUpdates implements Plugin.PluginBase {
const outliers = [
'anotivereads',
'asuratls',
+ 'helscans',
'mirilu',
'novelworldtranslations',
'sacredtexttranslations',
@@ -505,7 +579,7 @@ class NovelUpdates implements Plugin.PluginBase {
* - Gem Novels
* - Genesis Translations (Manually added)
* - Goblinslate
- * - Hel Scans
+ * - Hel Scans (Outlier)
* - ippotranslations
* - JATranslations
* - Light Novels Translations
@@ -521,7 +595,12 @@ class NovelUpdates implements Plugin.PluginBase {
* - Zetro Translation (Outlier)
*/
if (!isWordPress && !isBlogspot) {
- chapterText = await this.getChapterBody(loadedCheerio, domain, url);
+ chapterText = await this.getChapterBody(
+ loadedCheerio,
+ domain,
+ url,
+ result,
+ );
} else if (isBlogspot) {
bloatClasses = ['.button-container', '.separator'];
bloatClasses.map(tag => loadedCheerio(tag).remove());
@@ -541,7 +620,9 @@ class NovelUpdates implements Plugin.PluginBase {
'.chapter-warning',
'.entry-meta',
'.ezoic-ad',
+ '.genesistls-watermark',
'.mb-center',
+ '.modern-footnotes-footnote__note',
'.patreon-widget',
'.post-cats',
'.pre-bar',