Skip to content

Commit

Permalink
Update RealmScans.mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeZeDev authored Jul 5, 2023
1 parent ca210ab commit 2b65bda
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions src/web/mjs/connectors/RealmScans.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,13 @@ export default class RealmScans extends WordPressMangastream {

async _getMangas() {
const request = new Request(new URL(this.path, this.url), this.requestOptions);
const script = `
new Promise((resolve) => {
setTimeout(() => {
let mangalist = [...document.querySelectorAll('div.bsx a')].map(element => {
return {
id: element.pathname,
title: element.querySelector('div.tt').textContent.trim()
};
});
resolve(mangalist);
},2500);
});
`;
return await Engine.Request.fetchUI(request, script);
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) {
Expand Down

0 comments on commit 2b65bda

Please sign in to comment.