Skip to content

Commit

Permalink
[mangasee] changed website template (#1974)
Browse files Browse the repository at this point in the history
  • Loading branch information
ronny1982 authored Jul 4, 2020
1 parent 9fe2c1e commit 75349a2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 37 deletions.
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';
}
}

0 comments on commit 75349a2

Please sign in to comment.