diff --git a/src/web/img/connectors/readallcomics b/src/web/img/connectors/readallcomics new file mode 100644 index 00000000000..25ec085412e Binary files /dev/null and b/src/web/img/connectors/readallcomics differ diff --git a/src/web/mjs/connectors/ComicExtra.mjs b/src/web/mjs/connectors/ComicExtra.mjs index 38c04fb5757..2ec761d587e 100644 --- a/src/web/mjs/connectors/ComicExtra.mjs +++ b/src/web/mjs/connectors/ComicExtra.mjs @@ -8,7 +8,7 @@ export default class ComicExtra extends Connector { super.id = 'comicextra'; super.label = 'ComicExtra'; this.tags = ['comic', 'english']; - this.url = 'https://comicextra.org'; + this.url = 'https://comixextra.com'; this.path = '/comic-list/'; } @@ -21,7 +21,7 @@ export default class ComicExtra extends Connector { return this.getRootRelativeOrAbsoluteLink(element, request.url); }); - for(let page of pages) { + for (let page of pages) { const mangas = await this._getMangasFromPage(page); mangaList.push(...mangas); } diff --git a/src/web/mjs/connectors/ReadAllComics.mjs b/src/web/mjs/connectors/ReadAllComics.mjs new file mode 100644 index 00000000000..c61dde7c1c1 --- /dev/null +++ b/src/web/mjs/connectors/ReadAllComics.mjs @@ -0,0 +1,55 @@ +import Connector from '../engine/Connector.mjs'; +import Manga from '../engine/Manga.mjs'; + +export default class ReadAllComics extends Connector { + constructor() { + super(); + super.id = 'readallcomics'; + super.label = 'Read All Comics'; + this.tags = ['comics', 'english']; + this.url = 'https://readallcomics.com'; + this.requestOptions.headers.set('x-referer', this.url); + } + + async _getMangaFromURI(uri) { + const request = new Request(uri, this.requestOptions); + const id = uri.pathname; + const [title] = await this.fetchDOM(request, 'div.description-archive h1'); + return new Manga(this, id, title.textContent.trim()); + } + + async _getMangas() { + let request = new Request( + this.url + '/?story=&s=&type=comic', + this.requestOptions + ); + let data = await this.fetchDOM(request, 'ul.categories li a'); + return data.map((element) => { + return { + id: this.getRootRelativeOrAbsoluteLink(element, this.url), + title: element.text.trim(), + }; + }); + } + + async _getChapters(manga) { + let request = new Request(this.url + manga.id, this.requestOptions); + let data = await this.fetchDOM(request, 'ul.list-story li a'); + return data.map((element) => { + return { + id: this.getRootRelativeOrAbsoluteLink(element, this.url), + title: element.text.trim(), + language: '', + }; + }); + } + + async _getPages(chapter) { + let request = new Request(this.url + chapter.id, this.requestOptions); + let data = await this.fetchDOM( + request, + 'body > center > center > div source' + ); + return data.map((element) => this.getAbsolutePath(element, request.url)); + } +}