-
Notifications
You must be signed in to change notification settings - Fork 486
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [Mgkomik] add website support (#2767) * [SundayWebry] Add support for Yoru titles (#2784) (#2789) * [nightcomic, neoxscan] updated domain (#2770) * [comickiba] fixed page query (#2773) * [morpheusfansub] added website support (#2775) * [geceninlordu] added website support (#2775) * [shosetsumanga] removed dead website (#2775) * [manhwahentai] removed broken website (#2775) * [komiku] provide full manga list (including website's broken manga links) (#2776) * [hentai2read] fixed CSS queries, updated to async API method (#2777) * [readhentai] added website support (#2778) * [mangakatana] force image mime type detection, migrate to async API (#2780) * [pixiv] fixed image link detection (#2788) * [scantrad] updated base url for image links (#2791) * [sekaikomik] fixed CSS queries (#2793) * Fix ScanManga connector for french users (#2799) * [skymangas] changed template (#2802) * [pojokmanga] fixed copy & paste support (#2803) * [team1x1] fixed page query (#2804) Co-authored-by: Naufal Hakim <31276236+manh21@users.noreply.github.com> Co-authored-by: bluefox57 <76176720+bluefox57@users.noreply.github.com> Co-authored-by: Fabien Caylus <fabien.caylus@gmail.com>
- Loading branch information
1 parent
d904ef4
commit c16c329
Showing
27 changed files
with
182 additions
and
239 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
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 WordPressMadara from './templates/WordPressMadara.mjs'; | ||
|
||
export default class GeceninLordu extends WordPressMadara { | ||
|
||
constructor() { | ||
super(); | ||
super.id = 'geceninlordu'; | ||
super.label = 'Gecenin Lordu'; | ||
this.tags = [ 'manga', 'webtoon', 'turkish' ]; | ||
this.url = 'https://geceninlordu.com'; | ||
} | ||
} |
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,103 +1,64 @@ | ||
import Connector from '../engine/Connector.mjs'; | ||
import Manga from '../engine/Manga.mjs'; | ||
|
||
/** | ||
* | ||
*/ | ||
export default class Hentai2Read extends Connector { | ||
|
||
/** | ||
* | ||
*/ | ||
constructor() { | ||
super(); | ||
// Public members for usage in UI (mandatory) | ||
super.id = 'hentai2read'; | ||
super.label = 'Hentai2R'; | ||
this.tags = [ 'hentai', 'english' ]; | ||
super.isLocked = false; | ||
// Private members for internal usage only (convenience) | ||
this.url = 'https://hentai2read.com'; | ||
// Private members for internal use that can be configured by the user through settings menu (set to undefined or false to hide from settings menu!) | ||
this.config = undefined; | ||
} | ||
|
||
/** | ||
* | ||
*/ | ||
_getMangaListFromPages( mangaPageLinks, index ) { | ||
index = index || 0; | ||
return this.fetchDOM( mangaPageLinks[ index ], 'div.img-container div.img-overlay > a', 5 ) | ||
.then( data => { | ||
let mangaList = data.map( element => { | ||
return { | ||
id: this.getRelativeLink( element ), | ||
title: element.text.trim() | ||
}; | ||
} ); | ||
if( index < mangaPageLinks.length - 1 ) { | ||
return this._getMangaListFromPages( mangaPageLinks, index + 1 ) | ||
.then( mangas => mangaList.concat( mangas ) ); | ||
} else { | ||
return Promise.resolve( mangaList ); | ||
} | ||
} ); | ||
async _getMangaFromURI(uri) { | ||
const request = new Request(uri, this.requestOptions); | ||
const data = await this.fetchDOM(request, 'main div.content span[itemprop="name"]'); | ||
return new Manga(this, uri.pathname, data[0].textContent.trim()); | ||
} | ||
|
||
/** | ||
* | ||
*/ | ||
_getMangaList( callback ) { | ||
this.fetchDOM( this.url + '/hentai-list', 'ul.pagination li:nth-last-child(2) a' ) | ||
.then( data => { | ||
let pageCount = parseInt( data[0].text.trim() ); | ||
let pageLinks = [... new Array( pageCount ).keys()].map( page => this.url + '/hentai-list/all/any/all/name-az/' + ( page + 1 ) + '/' ); | ||
return this._getMangaListFromPages( pageLinks ); | ||
} ) | ||
.then( data => { | ||
callback( null, data ); | ||
} ) | ||
.catch( error => { | ||
console.error( error, this ); | ||
callback( error, undefined ); | ||
} ); | ||
async _getMangas() { | ||
let mangaList = []; | ||
const uri = new URL('/hentai-list', this.url); | ||
const request = new Request(uri, this.requestOptions); | ||
const data = await this.fetchDOM(request, 'ul.pagination li:nth-last-child(2) a'); | ||
const pageCount = parseInt(data[0].text.trim()); | ||
for(let page = 1; page <= pageCount; page++) { | ||
let mangas = await this._getMangasFromPage(page); | ||
mangaList.push(...mangas); | ||
} | ||
return mangaList; | ||
} | ||
|
||
/** | ||
* | ||
*/ | ||
_getChapterList( manga, callback ) { | ||
this.fetchDOM( this.url + manga.id, 'ul.nav-chapters li div.media > a' ) | ||
.then( data => { | ||
let chapterList = data.map( element => { | ||
return { | ||
id: this.getRelativeLink( element ), | ||
title: element.firstChild.textContent.replace( manga.title, '' ).trim(), | ||
language: 'en' | ||
}; | ||
} ); | ||
callback( null, chapterList ); | ||
} ) | ||
.catch( error => { | ||
console.error( error, manga ); | ||
callback( error, undefined ); | ||
} ); | ||
async _getMangasFromPage(page) { | ||
const uri = new URL(`/hentai-list/all/any/all/name-az/${page}/`, this.url); | ||
const request = new Request(uri, this.requestOptions); | ||
const data = await this.fetchDOM(request, 'div.book-grid div.overlay div.overlay-title a'); | ||
return data.map(element => { | ||
return { | ||
id: this.getRootRelativeOrAbsoluteLink(element, this.url), | ||
title: element.text.trim() | ||
}; | ||
}); | ||
} | ||
|
||
/** | ||
* | ||
*/ | ||
_getPageList( manga, chapter, callback ) { | ||
fetch( this.url + chapter.id, this.requestOptions ) | ||
.then( response => response.text() ) | ||
.then( data => { | ||
let pageList = data.match( /['"]images['"]\s*:\s*(\[[^\]]*?\])/ )[1]; | ||
pageList = JSON.parse( pageList ); | ||
pageList = pageList.map( image => 'https://static.hentaicdn.com/hentai' + image ); | ||
callback( null, pageList ); | ||
} ) | ||
.catch( error => { | ||
console.error( error, chapter ); | ||
callback( error, undefined ); | ||
} ); | ||
async _getChapters(manga) { | ||
const uri = new URL(manga.id, this.url); | ||
const request = new Request(uri, this.requestOptions); | ||
const data = await this.fetchDOM(request, 'ul.nav-chapters li div.media > a'); | ||
return data.map(element => { | ||
return { | ||
id: this.getRootRelativeOrAbsoluteLink(element, this.url), | ||
title: element.firstChild.textContent.trim() | ||
}; | ||
}); | ||
} | ||
|
||
async _getPages(chapter) { | ||
const uri = new URL(chapter.id, this.url); | ||
const request = new Request(uri, this.requestOptions); | ||
const data = await this.fetchRegex(request, /['"]images['"]\s*:\s*(\[[^\]]*?\])/g); | ||
return JSON.parse(data[0]).map(image => 'https://static.hentaicdn.com/hentai' + image); | ||
} | ||
} |
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
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 was deleted.
Oops, something went wrong.
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 Mgkomik extends WordPressMadara { | ||
|
||
constructor() { | ||
super(); | ||
super.id = 'mgkomik'; | ||
super.label = 'MGKOMIK'; | ||
this.tags = [ 'webtoon', 'indonesian' ]; | ||
this.url = 'https://mgkomik.my.id'; | ||
} | ||
|
||
} |
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,14 @@ | ||
import WordPressMadara from './templates/WordPressMadara.mjs'; | ||
|
||
export default class MorpheusFansub extends WordPressMadara { | ||
|
||
constructor() { | ||
super(); | ||
super.id = 'morpheusfansub'; | ||
super.label = 'Morpheus Fansub'; | ||
this.tags = [ 'manga', 'webtoon', 'turkish' ]; | ||
this.url = 'https://morpheus.animemangabilgileri.com'; | ||
|
||
this.queryTitleForURI = 'div.profile-manga div.post-title h1'; | ||
} | ||
} |
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
Oops, something went wrong.