Skip to content

Commit

Permalink
FIX LeviatanScans : no more WPMangaProtector
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeZeDev authored Jul 14, 2023
1 parent e58a1e1 commit 1023426
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 1023426

Please sign in to comment.