Skip to content

Commit

Permalink
FIX LeviatanScans : no more WPMangaProtector (#6008)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeZeDev authored Jul 31, 2023
1 parent 13721e5 commit c31ac33
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions src/web/mjs/connectors/LeviatanScans.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,4 @@ export default class LeviatanScans extends WordPressMadara {
_createMangaRequest(page) {
return new Request(new URL(`/ranking/page/${page}/`, this.url), this.requestOptions);
}

async _getPages(chapter) {
return await this._getWProtectedPages(chapter);
}

async _getWProtectedPages(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));
});
`;
return await Engine.Request.fetchUI(request, script);
}

async _handleConnectorURI(payload) {
let request = new Request(payload.url, this.requestOptions);
request.headers.set('x-referer', payload.referer);
request.headers.delete('x-origin');
let response = await fetch(request);
let data = await response.blob();
data = await this._blobToBuffer(data);
this._applyRealMime(data);
return data;
}
}

0 comments on commit c31ac33

Please sign in to comment.