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 RealmScans: change url #5981

Merged
merged 3 commits into from
Jul 8, 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
20 changes: 16 additions & 4 deletions src/web/mjs/connectors/RealmScans.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,29 @@ export default class RealmScans extends WordPressMangastream {
super.id = 'realmscans';
super.label = 'RealmScans';
this.tags = [ 'manga', 'english' ];
this.url = 'https://realmscans.com';
this.path = '/series/?list';
this.url = 'https://realmscans.xyz';
this.path = '/series';
}

async _getMangas() {
const request = new Request(new URL(this.path, this.url), this.requestOptions);
const data = await this.fetchDOM(request, 'div.bsx a');
return data.map(element => {
return {
id: element.pathname,
title: element.querySelector('div.tt').textContent.trim()
};
});
}

async _getPages(chapter) {
const data = await super._getPages(chapter);
return data.map(element => this.createConnectorURI(element));
}
async _handleConnectorURI(payload) {
let request = new Request(payload, this.requestOptions);
const request = new Request(payload, this.requestOptions);
request.headers.set('x-referer', this.url);
let response = await fetch(request);
const response = await fetch(request);
let data = await response.blob();
data = await this._blobToBuffer(data);
this._applyRealMime(data);
Expand Down
Loading