-
Notifications
You must be signed in to change notification settings - Fork 483
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import WordPressMadara from './templates/WordPressMadara.mjs'; | ||
|
||
export default class MangaOwlio extends WordPressMadara { | ||
|
||
constructor() { | ||
super(); | ||
super.id = 'mangaowlio'; | ||
super.label = 'MangaOwl.io'; | ||
this.tags = ['webtoon', 'english', 'manga' ]; | ||
this.url = 'https://mangaowl.io'; | ||
} | ||
|
||
} |
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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import WordPressMadara from './templates/WordPressMadara.mjs'; | ||
import Manga from '../engine/Manga.mjs'; | ||
export default class Manhwa18cc extends WordPressMadara { | ||
constructor() { | ||
super(); | ||
super.id = 'manhwa18cc'; | ||
super.label = 'Manhwa 18 (.cc)'; | ||
this.tags = [ 'webtoon', 'hentai', 'multi-lingual' ]; | ||
this.url = 'https://manhwa18.cc'; | ||
this.path ='/webtoons'; | ||
this.queryMangas = 'div.manga-item div.thumb a'; | ||
this.mangaNumberPerPage = 24; | ||
this.queryChapters ='div#chapterlist li a'; | ||
this.queryPages = 'div.read-manga div.read-content source'; | ||
} | ||
async _getMangaFromURI(uri) { | ||
const request = new Request(uri, this.requestOptions); | ||
const data = await this.fetchDOM(request, 'div.post-title > h1'); | ||
const id = uri.pathname; | ||
const title = data[0].textContent.replace('18+', '').trim(); | ||
return new Manga(this, id, title); | ||
} | ||
async _getMangas() { | ||
let mangaList = []; | ||
for (let page = 1, run = true; run; page++) { | ||
let mangas = await this._getMangasFromPage(page); | ||
|
||
//if mangalist is empty, fill it anyway | ||
if (mangaList.length == 0 && mangas.length > 0) { | ||
mangaList.push(...mangas); | ||
continue; | ||
} | ||
|
||
//if we have no more mangas, stop right here | ||
if (mangas.length == 0) { | ||
run == false; | ||
continue; | ||
} | ||
//now we have mangas, for sure, and mangalist not empty | ||
//we can check for existing mangas to stop the loop or not | ||
if (mangaList[mangaList.length - 1].id != mangas[mangas.length - 1].id) { | ||
mangaList.push(...mangas); | ||
} else run = false; | ||
|
||
} | ||
return mangaList; | ||
} | ||
async _getMangasFromPage(page) { | ||
let request = new Request(new URL(this.path+'/'+page, this.url), this.requestOptions); | ||
let data = await this.fetchDOM(request, this.queryMangas); | ||
return data.map(element => { | ||
return { | ||
id: this.getRootRelativeOrAbsoluteLink(element, request.url), | ||
title: element.title.trim() | ||
}; | ||
}); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import NineManga from './templates/NineManga.mjs'; | ||
|
||
export default class NineMangaFR extends NineManga { | ||
|
||
constructor() { | ||
super(); | ||
super.id = 'ninemanga-fr'; | ||
super.label = 'NineMangaFR'; | ||
this.tags = [ 'manga', 'french' ]; | ||
this.url = 'https://fr.ninemanga.com'; | ||
} | ||
|
||
get icon() { | ||
return '/img/connectors/ninemanga-en'; | ||
} | ||
|
||
} |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import FlatManga from './templates/FlatManga.mjs'; | ||
|
||
export default class TruyenChapVn extends FlatManga { | ||
|
||
constructor() { | ||
super(); | ||
super.id = 'truyenchapvn'; | ||
super.label = 'TruyenChap.vn'; | ||
this.tags = ['vietnamese', 'manga' ]; | ||
this.url = 'https://truyen.chap.vn'; | ||
} | ||
} |