Skip to content
New issue

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

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

Already on GitHub? # to your account

[mangasee] changed website template #1974

Merged
merged 3 commits into from
Jul 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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 modified src/web/img/connectors/mangasee
Binary file not shown.
3 changes: 1 addition & 2 deletions src/web/mjs/connectors/MangaLife.mjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import Connector from '../engine/Connector.mjs';
import Manga from '../engine/Manga.mjs';

// Very similar visual to MangaSee (older viewer)
export default class MangaLife extends Connector {

constructor() {
super();
super.id = 'mangalife';
super.label = 'MangaLife';
this.tags = [ 'manga', 'english' ];
this.tags = [ 'manga', 'webtoon', 'english' ];
this.url = 'https://manga4life.com';
}

Expand Down
39 changes: 4 additions & 35 deletions src/web/mjs/connectors/MangaSee.mjs
Original file line number Diff line number Diff line change
@@ -1,43 +1,12 @@
import Connector from '../engine/Connector.mjs';
import MangaLife from './MangaLife.mjs';

// Very similar visual to MangaLife (newer viewer)
export default class MangaSee extends Connector {
export default class MangaSee extends MangaLife {

constructor() {
super();
super.id = 'mangasee';
super.label = 'MangaSee';
this.tags = [ 'manga', 'english' ];
this.url = 'https://mangaseeonline.us';
}

async _getMangas() {
let request = new Request(this.url + '/directory/', this.requestOptions);
let data = await this.fetchDOM(request, '#content p 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, '.chapter-list a[class="list-group-item"]');
return data.map(element => {
let title = element.querySelector('span.chapterLabel').textContent;
return {
id: this.getRootRelativeOrAbsoluteLink(element, this.url).replace(/-page-\d+/, ''),
title: title.replace(manga.title, '').trim(),
language: 'en'
};
});
}

async _getPages(chapter) {
let request = new Request(this.url + chapter.id, this.requestOptions);
let data = await this.fetchDOM(request, 'div.fullchapimage source');
return data.map(element => this.createConnectorURI(this.getAbsolutePath(element, request.url)));
this.tags = [ 'manga', 'webtoon', 'english' ];
this.url = 'https://mangasee123.com';
}
}