Skip to content

Commit

Permalink
ManHuaScan.io fixes (#5267)
Browse files Browse the repository at this point in the history
* Fix updating manga list & clipboard feature
* Fixes #5067
  • Loading branch information
MikeZeDev authored and Sheepux committed Mar 26, 2023
1 parent a87eea1 commit b70f7f2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/web/mjs/connectors/ManhuaScan.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ export default class ManhuaScan extends FlatManga {
this.tags = ['manga', 'webtoon', 'hentai', 'multi-lingual'];
this.url = 'https://manhuascan.io';
this.requestOptions.headers.set('x-referer', this.url + '/');

this.queryMangaTitle = 'ul.manga-info h3';
this.queryChapters = 'div#tab-chapper div#list-chapters span.title a.chapter';
}

async _getMangas() {
let mangaList = [];
const uri = new URL('/manga-list.html', this.url);
const uri = new URL('/manga-list', this.url);
const request = new Request(uri, this.requestOptions);
const data = await this.fetchDOM(request, 'div.pagination-wrap ul.pagination li:nth-last-of-type(2) a');
const pageCount = parseInt(data[0].text);
Expand All @@ -27,7 +27,7 @@ export default class ManhuaScan extends FlatManga {
}

async _getMangasFromPage(page) {
const uri = new URL('/manga-list.html?page=' + page, this.url);
const uri = new URL('/manga-list?page=' + page, this.url);
const request = new Request(uri, this.requestOptions);
const data = await this.fetchDOM(request, 'div.media h3.media-heading a');
return data.map(element => {
Expand Down Expand Up @@ -62,4 +62,4 @@ export default class ManhuaScan extends FlatManga {
const data = await Engine.Request.fetchUI(request, script);
return data.map(link => this.createConnectorURI(link));
}
}
}

0 comments on commit b70f7f2

Please sign in to comment.