Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ReadAllComics and fix ComicExtra domain #7074

Merged
merged 3 commits into from
May 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added src/web/img/connectors/readallcomics
Binary file not shown.
4 changes: 2 additions & 2 deletions src/web/mjs/connectors/ComicExtra.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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/';
}

Expand All @@ -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);
}
Expand Down
47 changes: 47 additions & 0 deletions src/web/mjs/connectors/ReadAllComics.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import Connector from '../engine/Connector.mjs'

Check failure on line 1 in src/web/mjs/connectors/ReadAllComics.mjs

View workflow job for this annotation

GitHub Actions / ubuntu-latest

Missing semicolon

export default class ReadAllComics extends Connector {
constructor() {
super()

Check failure on line 5 in src/web/mjs/connectors/ReadAllComics.mjs

View workflow job for this annotation

GitHub Actions / ubuntu-latest

Missing semicolon
super.id = 'readallcomics'

Check failure on line 6 in src/web/mjs/connectors/ReadAllComics.mjs

View workflow job for this annotation

GitHub Actions / ubuntu-latest

Missing semicolon
super.label = 'Read All Comics'

Check failure on line 7 in src/web/mjs/connectors/ReadAllComics.mjs

View workflow job for this annotation

GitHub Actions / ubuntu-latest

Missing semicolon
this.tags = ['comics', 'english']

Check failure on line 8 in src/web/mjs/connectors/ReadAllComics.mjs

View workflow job for this annotation

GitHub Actions / ubuntu-latest

Missing semicolon
this.url = 'https://readallcomics.com'

Check failure on line 9 in src/web/mjs/connectors/ReadAllComics.mjs

View workflow job for this annotation

GitHub Actions / ubuntu-latest

Missing semicolon
this.requestOptions.headers.set('x-referer', this.url)

Check failure on line 10 in src/web/mjs/connectors/ReadAllComics.mjs

View workflow job for this annotation

GitHub Actions / ubuntu-latest

Missing semicolon
}

MikeZeDev marked this conversation as resolved.
Show resolved Hide resolved
async _getMangas() {
let request = new Request(
this.url + '/?story=&s=&type=comic',
this.requestOptions
)

Check failure on line 17 in src/web/mjs/connectors/ReadAllComics.mjs

View workflow job for this annotation

GitHub Actions / ubuntu-latest

Missing semicolon
let data = await this.fetchDOM(request, 'ul.categories li a')

Check failure on line 18 in src/web/mjs/connectors/ReadAllComics.mjs

View workflow job for this annotation

GitHub Actions / ubuntu-latest

Missing semicolon
return data.map((element) => {
return {
id: this.getRootRelativeOrAbsoluteLink(element, this.url),
title: element.text.trim(),
}

Check failure on line 23 in src/web/mjs/connectors/ReadAllComics.mjs

View workflow job for this annotation

GitHub Actions / ubuntu-latest

Missing semicolon
})
}

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:nth-child(5) > center > div:nth-child(2) source'
)
return data.map((element) => this.getAbsolutePath(element, request.url))
}
}
Loading