From f729dd5bd33025d96d3c7ec12a344bf9cdfd5cc5 Mon Sep 17 00:00:00 2001 From: Tristan Date: Sat, 19 Aug 2023 16:22:19 +0200 Subject: [PATCH] fix(GourmetScans): bypass WP Manga Protector borrowed the code from the MangaSY (a48270b) connector. --- src/web/mjs/connectors/GourmetScans.mjs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/web/mjs/connectors/GourmetScans.mjs b/src/web/mjs/connectors/GourmetScans.mjs index 1981b1afe2..2487907afc 100644 --- a/src/web/mjs/connectors/GourmetScans.mjs +++ b/src/web/mjs/connectors/GourmetScans.mjs @@ -9,4 +9,19 @@ export default class GourmetScans extends WordPressMadara { this.tags = [ 'webtoon', 'english' ]; this.url = 'https://gourmetscans.net'; } + + async _getPages(chapter) { + const url = new URL(chapter.id, this.url); + const request = new Request(url, this.requestOptions); + const script = ` + new Promise((resolve, reject) => { + var imgdata = JSON.parse(CryptoJS.AES.decrypt(chapter_data, wpmangaprotectornonce, { + format: CryptoJSAesJson + }).toString(CryptoJS.enc.Utf8)); + resolve(JSON.parse(imgdata)); + }); + `; + const data = await Engine.Request.fetchUI(request, script); + return data.map(picture => this.createConnectorURI({url : picture, referer : url})); + } } \ No newline at end of file