Skip to content

Commit

Permalink
update from master (#6987)
Browse files Browse the repository at this point in the history
* Fix ManhwaFreak: change fomain and filters (#6851)

Fixes #6849

* Fix LyraScans: change domain & rebrand (#6857)

* Fix LyraScans: change domain & rebrand

Fixes #6856

* update icon

* Fix NeoxScan: change domain (#6860)

* FIx ResetScans : change domain (#6854)

Fixes #6853

* Fix SwatManga : change domain (#6844)

Fixes #6842

* Fix KomikNesia : change domain (#6873)

Fixes #6871

* Fix MangaToon: change CSS for chapters (#6887)

get rid of duplicate chapters

* Fix ComicK: update domain (#6897)

Fixes #6896

* Fix MangaSail : change domain (#6898)

Fixes #6894

* Fix MangaBat : change domain (#6899)

* Fix MangaStarz : change domain (#6901)

Fixes #6900

* change domain (#6910)

Co-authored-by: Abdullah-KS <78895454+Abdullah-KS@users.noreply.github.com>

* FIx Siyahmelek: change domain (#6915)

Fixes #6908

* Fix MangaTX : domain changed (#6916)

Fixes #6911

* Fix TopToon : update CSS selectors (#6906)

* Fix TopToon : update CSS selectors

Fixes #6905

* Update TopToon.mjs

* Update TopToon.mjs

* attempt to fix lint error

* dont use optional chaining

optional chaining doesnt work in stable build because electron version is too old

* Fix MagKan: use Comici Viewer (#6927)

Similar to YoungChampion, YoungAnimal, Comicride, ComicMedu, etc....

Fixes #6926

* Fix winterscan : change domain (#6935)

#6933

* fix MangaSect source (#6930)

* fix MangaSect source

* fix lint

* better mangasect fix

---------

Co-authored-by: Victor Abrate <me@vab.one>
Co-authored-by: MikeZeDev <MikeZeDev@users.noreply.github.com>

* Fix MoonWitchInLove : change domain (#6942)

Fixes #6936

* add connector monzeekomik (#6954)

* add connector monzeekomik

* fix lint

---------

Co-authored-by: MikeZeDev <MikeZeDev@users.noreply.github.com>

* Fix ComicExtra : change domain (#6951)

* FIx KomikAV: domain type (#6881)

Fixes #6879

* Fix Saikaiscan : change domain (#6963)

Fixes #6620

* Fix LxHentai: change domain (#6970)

Fixes #6968

* Lock ESLint Version (#6971)

* lock eslint version

* fix lint errors

---------

Co-authored-by: ZIRO <78895454+PD-ZIRO@users.noreply.github.com>
Co-authored-by: Abdullah-KS <78895454+Abdullah-KS@users.noreply.github.com>
Co-authored-by: Victor Abrate <victor.abrate@gmail.com>
Co-authored-by: Victor Abrate <me@vab.one>
Co-authored-by: akn19 <86169232+akn19@users.noreply.github.com>
Co-authored-by: Ronny <wegener.ronny@gmail.com>
  • Loading branch information
7 people committed Apr 17, 2024
1 parent 9022259 commit 5050385
Show file tree
Hide file tree
Showing 28 changed files with 100 additions and 162 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"asar": "latest",
"discord-rpc": "latest",
"electron": "8.3.4",
"eslint": "latest",
"eslint": "^8.57.0",
"fs-extra": "latest",
"innosetup-compiler": "latest",
"jest": "latest",
Expand All @@ -35,7 +35,7 @@
"start:build": "npm run build:web && electron . --update-url=DISABLED --cache-directory=./build/latest",
"lint": "npm run lint:app && npm run lint:web",
"lint:app": "eslint ./src/app --ignore-path .gitignore",
"lint:web": "eslint ./src/web/mjs/**/*.mjs --ignore-path .gitignore --ignore-pattern Connectors.mjs",
"lint:web": "eslint ./src/web/mjs/**/*.mjs --ignore-path .gitignore --parser-options ecmaVersion:2020",
"format": "npm run format:app && npm run format:web",
"format:app": "npm run lint:app -- --fix",
"format:web": "npm run lint:web -- --fix",
Expand Down
Binary file modified src/web/img/connectors/lyrascans
Binary file not shown.
Binary file added src/web/img/connectors/monzeekomik
Binary file not shown.
2 changes: 1 addition & 1 deletion src/web/mjs/connectors/ComicExtra.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default class ComicExtra extends Connector {
super.id = 'comicextra';
super.label = 'ComicExtra';
this.tags = ['comic', 'english'];
this.url = 'https://comicextra.me';
this.url = 'https://comicextra.org';
this.path = '/comic-list/';
}

Expand Down
6 changes: 3 additions & 3 deletions src/web/mjs/connectors/ComicK.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ export default class ComicK extends Connector {
super.id = 'comick';
super.label = 'ComicK';
this.tags = [ 'manga', 'english' ];
this.url = 'https://comick.cc';
this.apiurl = 'https://api.comick.cc';
this.url = 'https://comick.io';
this.apiurl = 'https://api.comick.io';
this.requestOptions.headers.set('x-origin', this.url );
this.requestOptions.headers.set('x-referer', this.apiurl );

}

canHandleURI(uri) {
return /https?:\/\/comick\.(app|ink|cc)/.test(uri.origin);
return /https?:\/\/comick\.(app|ink|cc|io)/.test(uri.origin);
}

async _getEmbeddedJSON(uri) {
Expand Down
2 changes: 1 addition & 1 deletion src/web/mjs/connectors/KomikAV.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default class KomikAV extends WordPressMangastream {
super.id = 'komikav';
super.label = 'APKomik';
this.tags = [ 'manga', 'indonesian' ];
this.url = 'https://apkomic.cc';
this.url = 'https://apkomik.cc';
this.path = '/manga/list-mode/';
}
}
11 changes: 3 additions & 8 deletions src/web/mjs/connectors/KomikNesia.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@ export default class KomikNesia extends WordPressMangastream {
super.id = 'komiknesia';
super.label = 'KomikNesia';
this.tags = [ 'manga', 'webtoon', 'indonesian' ];
this.url = 'https://komiknesia.com';
this.path = '/latest-update/?list';

this.queryMangas = 'div.listttl ul li a';
this.queryChapters = 'div#chapter_list span.eps a';
this.queryChaptersTitle = undefined;
this.queryPages = 'div.reader-area img[src]:not([src=""])';
this.url = 'https://komiknesia.xyz';
this.path = '/manga/list-mode';
}
}
}
2 changes: 1 addition & 1 deletion src/web/mjs/connectors/LxHentai.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default class LxHentai extends MojoPortalComic {
super.id = 'lxhentai';
super.label = 'LXHENTAI';
this.tags = [ 'manga', 'hentai', 'vietnamese' ];
this.url = 'https://lxmanga.net';
this.url = 'https://lxmanga.cc';

this.queryMangaTitle = 'head title';
this.queryChapter = 'div.justify-between ul.overflow-y-auto a';
Expand Down
8 changes: 4 additions & 4 deletions src/web/mjs/connectors/LyraScans.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ export default class LyraScans extends WordPressMangastream {
constructor() {
super();
super.id = 'lyrascans';
super.label = 'Lyra Scans';
super.label = 'Quantum Scans';
this.tags = [ 'manga', 'english', 'scanlation' ];
this.url = 'https://lyrascans.com';
this.path = '/manga/list-mode/';
this.url = 'https://readers-point.space';
this.path = '/series/list-mode/';
}
}
}
55 changes: 4 additions & 51 deletions src/web/mjs/connectors/MagKan.mjs
Original file line number Diff line number Diff line change
@@ -1,59 +1,12 @@
import Connector from '../engine/Connector.mjs';
import Manga from '../engine/Manga.mjs';
import YoungChampion from './YoungChampion.mjs';

export default class MagKan extends Connector {
export default class MagKan extends YoungChampion {

constructor() {
super();
super.id = 'magkan';
super.label = 'MagKan';
this.tags = [ 'manga', 'japanese' ];
this.url = 'http://kansai.mag-garden.co.jp';
this.url = 'https://kansai.mag-garden.co.jp';
}

async _getMangaFromURI(uri) {
const request = new Request(uri, this.requestOptions);
const data = await this.fetchDOM(request, 'meta[property="og:title"]');
return new Manga(this, uri.pathname, data[0].content.trim());
}

async _getMangas() {
const uri = new URL(this.url);
const request = new Request(uri, this.requestOptions);
const data = await this.fetchDOM(request, 'div#main div.panel div.box div.inner');
return data.map(element => {
return {
id: this.getRootRelativeOrAbsoluteLink(element.querySelector('a'), this.url),
title: element.querySelector('h2.comic_name').textContent.trim()
};
});
}

async _getChapters(manga) {
const uri = new URL(manga.id, this.url);
const request = new Request(uri, this.requestOptions);
const body = await this.fetchDOM(request);
const current = [...body.querySelectorAll('div#main div.update_summary div.exp ul.btn li a[href*="/assets/files/"]')].map(element => {
return {
id: this.getRootRelativeOrAbsoluteLink(element, this.url).replace(/\/HTML5\/?$/i, ''),
title: element.text.replace('を読む', '').trim()
};
});
const previous = [...body.querySelectorAll('div#main div.sam_exp div.exp')].map(element => {
return {
id: this.getRootRelativeOrAbsoluteLink(element.querySelector('ul.btn li a[href*="/assets/files/"]'), this.url).replace(/\/HTML5\/?$/i, ''),
title: element.querySelector('div.back_number_summary div.ttl').textContent.trim()
};
});
return [ ...current, ...previous ];
}

async _getPages(chapter) {
const uri = new URL(chapter.id + '/iPhone/ibook.xml', this.url);
const request = new Request(uri, this.requestOptions);
const response = await fetch(request);
const data = await response.text();
const pages = parseInt(data.match(/<total>(\d+)<\/total>/)[1]);
return new Array(pages).fill().map((_, index) => this.getAbsolutePath(`${chapter.id}/books/images/2/${index + 1}.jpg`, request.url));
}
}
}
6 changes: 3 additions & 3 deletions src/web/mjs/connectors/MangaBat.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default class MangaBat extends MangaNel {
super.id = 'mangabat';
super.label = 'MangaBat';
this.tags = [ 'manga', 'webtoon', 'english' ];
this.url = 'https://m.mangabat.com';
this.url = 'https://h.mangabat.com';

this.path = '/manga-list-all/';
this.queryMangas = 'div.panel-list-story div.list-story-item h3 a.item-title';
Expand All @@ -16,6 +16,6 @@ export default class MangaBat extends MangaNel {

canHandleURI(uri) {
// Test: https://regex101.com/r/GlzAw2/2/tests
return /^(m\.|read\.)?mangabat\.com$/.test(uri.hostname);
return /^(m\.|read\.|h\.)?mangabat\.com$/.test(uri.hostname);
}
}
}
2 changes: 1 addition & 1 deletion src/web/mjs/connectors/MangaSail.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default class MangaSail extends Connector {
super.id = 'mangasail';
super.label = 'MangaSail';
this.tags = [ 'manga', 'english' ];
this.url = 'https://www.mangasail.net';
this.url = 'https://sailmg.com';

this.config = {
username: {
Expand Down
80 changes: 25 additions & 55 deletions src/web/mjs/connectors/MangaSect.mjs
Original file line number Diff line number Diff line change
@@ -1,70 +1,40 @@
import Connector from '../engine/Connector.mjs';
import Manga from '../engine/Manga.mjs';
import MojoPortalComic from './templates/MojoPortalComic.mjs';

export default class MangaSect extends Connector {
export default class MangaSect extends MojoPortalComic {

constructor() {
super();
super.id = 'mangasect';
super.label = 'MangaSect';
this.tags = [ 'webtoon', 'english' ];
this.url = 'https://mangasect.com';
this.url = 'https://mangasect.net';
this.path = '/all-manga/';
}

async _getMangaFromURI(uri) {
const request = new Request(uri, this.requestOptions);
const data = await this.fetchDOM(request, 'header h1');
return new Manga(this, uri.pathname, data[0].textContent.trim());
}
async _getPages(chapter) {
const request = new Request(new URL(chapter.id, this.url), this.requestOptions);
const script = `
new Promise(resolve => {
async _getMangas() {
let mangaList = [];
const uri = new URL(this.path, this.url);
const request = new Request(uri, this.requestOptions);
const data = await this.fetchDOM(request, 'div.blog-pager span:last-of-type a');
const pageCount = parseInt(data[0].href.match(/\/(\d)+\//)[1]);
for(let page = 1; page <= pageCount; page++) {
const mangas = await this._getMangasFromPage(page);
mangaList.push(...mangas);
}
return mangaList;
}
function parseResults(data) {
const dom = new DOMParser().parseFromString(data, 'text/html');
let nodes = [...dom.querySelectorAll('img')];
resolve(nodes.map(element => element.dataset.original));
}
async _getMangasFromPage(page) {
const uri = new URL(this.path + page, this.url);
const request = new Request(uri, this.requestOptions);
const data = await this.fetchDOM(request, 'div.grid div.text-center > a');
return data.map(element => {
return {
id: this.getRootRelativeOrAbsoluteLink(element, this.url),
title: element.text.trim()
};
});
const ajaxendpoint = new URL('/ajax/image/list/chap/' + CHAPTER_ID, window.location.href);
fetch(ajaxendpoint, {
headers: {
'X-Requested-With': 'XMLHttpRequest',
}
})
.then(response => response.json())
.then(jsonData => {
parseResults(jsonData.html);
});
});
`;
return Engine.Request.fetchUI(request, script);
}

async _getChapters(manga) {
const uri = new URL(manga.id, this.url);
const request = new Request(uri, this.requestOptions);
const data = await this.fetchDOM(request, 'li.chapter > a');
return data.map(element => {
return {
id: this.getRootRelativeOrAbsoluteLink(element, this.url),
title: element.text.trim()
};
});
}

async _getPages(chapter) {
const referer = new URL(chapter.id, this.url);
const chapterid = chapter.id.match(/\/([\d]+)$/)[1];
const uri = new URL ('/ajax/image/list/chap/' + chapterid, this.url);
const request = new Request(uri, this.requestOptions);
request.headers.set('x-referer', referer);
request.headers.set('X-Requested-With', 'XMLHttpRequest');
const response = await this.fetchJSON(request);
const dom = this.createDOM(response.html);
const data = dom.querySelectorAll('source[data-src]');
return Array.from(data).map(image => this.getAbsolutePath(image.dataset['src'], request.url));
}
}
4 changes: 2 additions & 2 deletions src/web/mjs/connectors/MangaStarz.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ export default class MangaStarz extends WordPressMadara {
super.id = 'mangastarz';
super.label = 'مانجا ستارز (Mangastarz)';
this.tags = [ 'manga', 'webtoon', 'arabic' ];
this.url = 'https://mangastarz.org';
this.url = 'https://manga-starz.com';
}
}
}
2 changes: 1 addition & 1 deletion src/web/mjs/connectors/MangaSwat.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default class MangaSwat extends WordPressMangastream {
super.id = 'mangaswat';
super.label = 'Goldragon (SWAT Manga)';
this.tags = ['webtoon', 'arabic'];
this.url = 'https://goldragon.me';
this.url = 'https://swatmanhua.com';
this.path = '/manga/list-mode';

this.queryChapters = 'div.bxcl ul li span.lchx a';
Expand Down
4 changes: 2 additions & 2 deletions src/web/mjs/connectors/MangaTX.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ export default class MangaTX extends WordPressMadara {
super.id = 'mangatx';
super.label = 'Mangatx';
this.tags = [ 'webtoon', 'english' ];
this.url = 'https://mangatx.com';
this.url = 'https://mangatx.to';
}
}
}
2 changes: 1 addition & 1 deletion src/web/mjs/connectors/Mangalek.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default class Mangalek extends WordPressMadara {
super.id = 'mangalek';
super.label = 'مانجا ليك (Mangalek)';
this.tags = [ 'manga', 'webtoon', 'arabic' ];
this.url = 'https://manga-lek.net';
this.url = 'https://lekmanga.net';
this.queryTitleForURI = 'div.profile-manga div.post-title h1';
this.requestOptions.headers.set('x-referer', this.url);
}
Expand Down
5 changes: 3 additions & 2 deletions src/web/mjs/connectors/ManhwaFreak.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ export default class ManhwaFreak extends WordPressMangastream {
super.id = 'manhwafreak';
super.label = 'ManhwaFreak';
this.tags = [ 'manga', 'english', 'webtoon'];
this.url = 'https://manhwa-freak.com';
this.url = 'https://freakcomic.com';
this.path = '/manga/';
this.queryMangas = 'div.lastest-serie > a';
this.queryChapters = 'div.chapter-li > a';
this.queryChaptersTitle = 'div.chapter-info > p';
}

async _getPages(chapter) {
return (await super._getPages(chapter)).filter(page => !page.includes('ajax-loader'));
return (await super._getPages(chapter))
.filter(page => !page.includes('ajax-loader') && !page.endsWith('/100.5.gif'));
}
}
19 changes: 19 additions & 0 deletions src/web/mjs/connectors/MonzeeKomik.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import WordPressMangastream from './templates/WordPressMangastream.mjs';

export default class MonzeeKomik extends WordPressMangastream {

constructor() {
super();
super.id = 'monzeekomik';
super.label = 'MonzeeKomik';
this.tags = ['manga', 'manhwa', 'indonesian'];
this.url = 'https://monzeekomik.my.id';
this.path = '/manga/list-mode/';
}

async _getMangas() {
const mangas = await super._getMangas();
mangas.forEach(manga => manga.title = manga.title.replace(/Bahasa Indonesia$/i, '').trim());
return mangas;
}
}
4 changes: 2 additions & 2 deletions src/web/mjs/connectors/MoonWitchInLove.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ export default class MoonWitchInLove extends WordPressMadara {
super.id = 'moonwitchinlove';
super.label = 'Moon Witch In Love';
this.tags = [ 'webtoon', 'portuguese', 'scanlation' ];
this.url = 'https://moonwitchinlove.com';
this.url = 'https://moonwitchinlovescan.com';
}
}
}
2 changes: 1 addition & 1 deletion src/web/mjs/connectors/NeoxScan.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default class NeoxScan extends WordPressMadara {
super.id = 'neoxscan';
super.label = 'Neox Scanlator';
this.tags = [ 'manga', 'webtoon', 'portuguese', 'scanlation' ];
this.url = 'https://nexoscans.com';
this.url = 'https://nexoscans.net';
this.queryTitleForURI = '.post-title';
this.requestOptions.headers.set('x-referer', this.url);
}
Expand Down
2 changes: 1 addition & 1 deletion src/web/mjs/connectors/ResetScans.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default class ResetScans extends WordPressMadara {
super.id = 'resetscans';
super.label = 'Reset Scans';
this.tags = [ 'manga', 'webtoon', 'english' ];
this.url = 'https://reset-scans.us';
this.url = 'https://reset-scans.xyz';
this.queryChapters = 'li.wp-manga-chapter div.li__text > a';
}
}
Loading

0 comments on commit 5050385

Please sign in to comment.