Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX LeviatanScans : no more WPMangaProtector #6008

Merged
merged 1 commit into from
Jul 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}
}