Skip to content

Commit

Permalink
Fix MangaPill: add referrer for pages (#6613)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeZeDev authored Dec 30, 2023
1 parent bd05fcd commit e51fa32
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/web/mjs/connectors/MangaPill.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export default class MangaPill extends Connector {
super.label = 'Mangapill';
this.tags = [ 'manga', 'english' ];
this.url = 'https://mangapill.com';
this.requestOptions.headers.set('x-referer', this.url);
}

async _getMangaFromURI(uri) {
Expand Down Expand Up @@ -54,6 +55,6 @@ export default class MangaPill extends Connector {
async _getPages(chapter) {
let request = new Request(new URL(chapter.id, this.url), this.requestOptions);
let data = await this.fetchDOM(request, 'source');
return data.map(element => this.getAbsolutePath(element.dataset.src, request.url));
return data.map(element => this.createConnectorURI(this.getAbsolutePath(element.dataset.src, request.url)));
}
}

0 comments on commit e51fa32

Please sign in to comment.