-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6d13602
commit 154d274
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |