Skip to content

Commit

Permalink
Fix TuMangaOnlineHentai: clipboard & pages (#7116)
Browse files Browse the repository at this point in the history
Fixes #7115
  • Loading branch information
MikeZeDev authored and ronny1982 committed Jul 27, 2024
1 parent 404241b commit 9b7e06d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/web/mjs/connectors/TuMangaOnlineHentai.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ export default class TuMangaOnlineHentai extends Connector {
this.links = {
login: 'https://tmohentai.com/login'
};
this.requestOptions.headers.set('x-referer', this.url);
}

async _getMangaFromURI(uri) {
let request = new Request(uri, this.requestOptions);
let data = await this.fetchDOM(request, 'div.panel-title div.panel-heading h3.truncate');
let data = await this.fetchDOM(request, 'div.panel-title div.panel-heading h3');
let id = uri.pathname.split('/').pop();
let title = data[0].innerText.trim();
return new Manga(this, id, title);
Expand Down Expand Up @@ -51,6 +52,6 @@ export default class TuMangaOnlineHentai extends Connector {
async _getPages(chapter) {
let request = new Request(`${this.url}/reader/${chapter.id}/cascade`, this.requestOptions);
let data = await this.fetchDOM(request, 'div#content-images source.content-image');
return data.map(element => this.getAbsolutePath(element.dataset['original'] || element, request.url));
return data.map(element => this.createConnectorURI(this.getAbsolutePath(element.dataset['original'] || element, request.url)));
}
}
}

0 comments on commit 9b7e06d

Please sign in to comment.