Skip to content

Commit

Permalink
fix(GourmetScans): bypass WP Manga Protector (#6160)
Browse files Browse the repository at this point in the history
borrowed the code from the MangaSY (a48270b) connector.
  • Loading branch information
TristanWasTaken authored and Sheepux committed Jan 2, 2024
1 parent bc7d688 commit a5bfe55
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/web/mjs/connectors/GourmetScans.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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}));
}
}

0 comments on commit a5bfe55

Please sign in to comment.