Skip to content

Commit

Permalink
FIX RealmScans: change url (#5981)
Browse files Browse the repository at this point in the history
* FIX RealmScans: change url

* fix getting mangas list

* Update RealmScans.mjs
  • Loading branch information
MikeZeDev authored Jul 8, 2023
1 parent f40050a commit a3b10e8
Showing 1 changed file with 16 additions and 4 deletions.
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

0 comments on commit a3b10e8

Please sign in to comment.