Skip to content

Commit

Permalink
Manhwax: change domain (#7254)
Browse files Browse the repository at this point in the history
Fixes #7253
  • Loading branch information
MikeZeDev committed Jul 14, 2024
1 parent 7926a22 commit d70c411
Showing 1 changed file with 3 additions and 23 deletions.
26 changes: 3 additions & 23 deletions src/web/mjs/connectors/Manhwax.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,7 @@ export default class Manhwax extends WordPressMangastream {
super.id = 'manhwax';
super.label = 'Manhwax';
this.tags = [ 'manga', 'english', 'webtoon', 'hentai'];
this.path = '/az-list/page/';
this.url = 'https://manhwax.com';
this.queryMangas = 'div.listo div.bs div.bsx a';
this.path = '/manga/list-mode/';
this.url = 'https://manhwax.org';
}
async _getMangas() {
let mangaList = [];
for (let page = 1, run = true; run; page++) {
const mangas = await this._getMangasFromPage(page);
mangas.length > 0 ? mangaList.push(...mangas) : run = false;
}
return mangaList;
}
async _getMangasFromPage(page) {
const uri = new URL(this.path + page, this.url);
const request = new Request(uri, this.requestOptions);
const data = await this.fetchDOM(request, this.queryMangas);
return data.map(element => {
return {
id: this.getRootRelativeOrAbsoluteLink(element, this.url),
title: element.querySelector('div.bigor div.tt').textContent.trim()
};
});
}
}
}

0 comments on commit d70c411

Please sign in to comment.