-
Notifications
You must be signed in to change notification settings - Fork 469
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mangasee] changed website template (#1974)
- Loading branch information
Showing
3 changed files
with
5 additions
and
37 deletions.
There are no files selected for viewing
Binary file not shown.
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
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 |
---|---|---|
@@ -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'; | ||
} | ||
} |