Skip to content

Commit

Permalink
feat(AGS): create connector (manga-download#6753)
Browse files Browse the repository at this point in the history
  • Loading branch information
TristanWasTaken authored and serge-reboul committed Mar 3, 2024
1 parent c0c6842 commit f06f82f
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/web/mjs/connectors/AGS.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import WordPressMangastream from './templates/WordPressMangastream.mjs';

export default class AGS extends WordPressMangastream {

constructor() {
super();
super.id = 'ags';
super.label = 'AGS (Animated Glitched Scans)';
this.tags = [ 'manga', 'english', 'scanlation' ];
this.url = 'https://agscomics.com';
this.path = '/series/?list';
}

get icon() {
return '/img/connectors/anigliscans';
}

async _getPages(chapter) {
const data = await super._getPages(chapter);
return data.map(element => this.createConnectorURI(element));
}

async _handleConnectorURI(payload) {
const request = new Request(payload, this.requestOptions);
request.headers.set('x-referer', this.url);
let response = await fetch(request);
let data = await response.blob();
data = await this._blobToBuffer(data);
this._applyRealMime(data);
return data;
}
}

0 comments on commit f06f82f

Please sign in to comment.