Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge branch dev2 #6

Merged
merged 53 commits into from
Nov 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
2bbd9c7
Add Manhwa18.cc
MikeZeDev Nov 27, 2022
d5fc7bc
manhwa18cc icon
MikeZeDev Nov 27, 2022
2857f28
Add MadTheme template
MikeZeDev Nov 27, 2022
df80aa4
MadTheme Websites
MikeZeDev Nov 27, 2022
d21bc14
Add Mangabuddy Icon
MikeZeDev Nov 27, 2022
98530ad
Streaming handlers enhancement
MikeZeDev Nov 28, 2022
6da11c1
Add Mavanimes.co
MikeZeDev Nov 28, 2022
75944d7
add mavanimes icon
MikeZeDev Nov 28, 2022
1ce7072
Delete manhwa18cc
MikeZeDev Nov 28, 2022
3694c1b
Upload manhwa18cc icon again
MikeZeDev Nov 28, 2022
2518f08
Add MangaPlanet
MikeZeDev Nov 28, 2022
35a78d6
Add MangaPlanet Icon
MikeZeDev Nov 28, 2022
663e677
Add Anizero
MikeZeDev Nov 29, 2022
872ee4f
Add anizero icon
MikeZeDev Nov 29, 2022
a6cad44
Add videostream "BloggerVideo"
MikeZeDev Nov 29, 2022
c422eb7
Add Yurineko icon
MikeZeDev Nov 29, 2022
33ecb15
Add Yurineko
MikeZeDev Nov 29, 2022
467ddbe
Pair Of Two fix
MikeZeDev Nov 29, 2022
d57372d
Add MangaTales
MikeZeDev Nov 30, 2022
ece0b33
Merge branch 'manga-download:master' into MZD-dev2
MikeZeDev Nov 30, 2022
f8f8b3b
Add Mangatales icon
MikeZeDev Nov 30, 2022
5f8996c
fix typo
MikeZeDev Nov 30, 2022
4331203
Merge branch 'manga-download:master' into MZD-dev2
MikeZeDev Dec 2, 2022
3641b5f
Merge branch 'manga-download:master' into MZD-dev2
MikeZeDev Dec 4, 2022
3700387
Merge branch 'manga-download:master' into MZD-dev2
MikeZeDev Dec 8, 2022
43e26fd
Merge branch 'manga-download:master' into MZD-dev2
MikeZeDev Dec 9, 2022
a015a6a
mangaplanet fix classname
MikeZeDev Dec 9, 2022
0a2c519
Madtheme template : Adjust connectors
MikeZeDev Dec 17, 2022
6e9aa15
Better MadTheme template
MikeZeDev Dec 17, 2022
0ab3ec7
add mangaforest icon
MikeZeDev Dec 17, 2022
7f3ed26
Madtheme : tweaking getChapters
MikeZeDev Dec 17, 2022
205a923
Update MadTheme.mjs
MikeZeDev Dec 24, 2022
9fcc168
Manga1001 : Use MadThme and unscramble pictures
MikeZeDev Dec 24, 2022
a474494
Update MadTheme.mjs
MikeZeDev Dec 24, 2022
3548f6b
Update MangaForest.mjs
MikeZeDev Dec 24, 2022
a235a32
Add Manga1001Top
MikeZeDev Dec 24, 2022
58c2c51
Add manga1001top icon
MikeZeDev Dec 24, 2022
da2b0f7
Add files via upload
MikeZeDev Dec 27, 2022
7a172ef
Update Manga1001.mjs
MikeZeDev Jan 2, 2023
6e152fb
Add files via upload
MikeZeDev Jan 2, 2023
ae2d72d
Update Mav.mjs
MikeZeDev Jan 2, 2023
97de2fd
Add files via upload
MikeZeDev Jan 7, 2023
1842856
Add files via upload
MikeZeDev Jan 7, 2023
737248a
Add files via upload
MikeZeDev Jan 7, 2023
6bf28ed
Add files via upload
MikeZeDev Jan 7, 2023
13a1de3
Add files via upload
MikeZeDev Jan 10, 2023
143ca1b
Add files via upload
MikeZeDev Jan 15, 2023
4c4362e
Add files via upload
MikeZeDev Jan 15, 2023
f1345c7
Add files via upload
MikeZeDev Jan 15, 2023
38fbd9a
Add files via upload
MikeZeDev Jan 15, 2023
77531c2
Add files via upload
MikeZeDev Jan 15, 2023
c7df0ba
Add files via upload
MikeZeDev Jan 16, 2023
ec09924
Merge branch 'master' into MZD-dev2
MikeZeDev Nov 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added src/web/img/connectors/anizero
Binary file not shown.
Binary file modified src/web/img/connectors/manhwa18cc
Binary file not shown.
Binary file added src/web/img/connectors/mavanimes
Binary file not shown.
89 changes: 80 additions & 9 deletions src/web/mjs/connectors/Ainzscans.mjs
Original file line number Diff line number Diff line change
@@ -1,22 +1,93 @@
import WordPressMangastream from './templates/WordPressMangastream.mjs';
import Connector from '../engine/Connector.mjs';

export default class Ainzscans extends WordPressMangastream {
export default class Ainzscans extends Connector {

constructor() {
super();
super.id = 'ainzscans';
super.label = 'Ainz Scans';
this.tags = [ 'webtoon', 'indonesian', 'scanlation' ];
this.url = 'https://ainzscans.net';
this.path = '/series/list-mode';
this.url = 'https://www.ainzscans.my.id';
this.resultsPerPages = 500;
}

async _getMangas() {
return (await super._getMangas()).map(manga => {
return {
id : manga.id,
title : manga.title.replace('Bahasa Indonesia', '').trim()
};
let mangalist = [];
let uri = new URL('/feeds/posts/default/-/Series?alt=json&max-results='+this.resultsPerPages, this.url);
let request = new Request(uri, this.requestOptions);
let data = await this.fetchJSON(request);
const totalentries = parseInt(data.feed.openSearch$totalResults['$t']);
let numpages = Math.floor(totalentries / this.resultsPerPages);
numpages == 0 ? numpages++ : numpages;
for (let page = 0; page < numpages; page++) {
uri = new URL('/feeds/posts/default/-/Series?alt=json&max-results=500&start-index='+ page * this.resultsPerPages+1, this.url);
request = new Request(uri, this.requestOptions);
let data = await this.fetchJSON(request);

data.feed.entry.forEach(entry => {
mangalist.push( {
id: this.getRootRelativeOrAbsoluteLink( entry.link.find( a => a.rel === 'alternate' ).href, request.url ),
title: entry.title['$t'].trim()
});
});

}
return mangalist;
}

async _getChapters(manga) {
let chapterlist = [];
const uri = new URL(manga.id, this.url);
const script = `
new Promise(resolve => {
resolve(label_chapter);
});
`;
let request = new Request(uri);
const chapterSlang = await Engine.Request.fetchUI(request, script, 5000);

let apiuri = new URL('/feeds/posts/default/-/'+chapterSlang+'?alt=json&max-results='+this.resultsPerPages, this.url);
request = new Request(apiuri, this.requestOptions);
let feeds = await this.fetchJSON(request);
const totalentries = parseInt(feeds.feed.openSearch$totalResults['$t']);
let numpages = Math.floor(totalentries / this.resultsPerPages);
numpages == 0 ? numpages++ : numpages;

for (let page = 0; page < numpages; page++) {
apiuri = new URL('/feeds/posts/default/-/'+chapterSlang+'?alt=json&max-results='+this.resultsPerPages+'&start-index='+ page * this.resultsPerPages+1, this.url);
request = new Request(apiuri, this.requestOptions);
let data = await this.fetchJSON(request);

data.feed.entry.forEach(entry => {
const entrylink = entry.link.find( a => a.rel === 'alternate' ).href;
if (entrylink != uri ) {
chapterlist.push( {
id: entry.id['$t'],
title: entry.title['$t'].trim()
});
}

});

}
return chapterlist;
}

async _getPages(chapter) {
let uri = new URL(chapter.manga.id, this.url);
const script = `
new Promise(resolve => {
resolve(label_chapter);
});
`;
let request = new Request(uri);
const chapterSlang = await Engine.Request.fetchUI(request, script, 5000);

uri = new URL('/feeds/posts/default/-/'+chapterSlang+'?alt=json', this.url);
request = new Request(uri, this.requestOptions);
const feeds = await this.fetchJSON(request);
const goodchap = feeds.feed.entry.find( a => a.id['$t'] == chapter.id);
const pictures = this.createDOM(goodchap.content['$t']).querySelectorAll('source');
return Array.from(pictures).map(entry => this.getRootRelativeOrAbsoluteLink(entry.dataset['src'] || entry.src, this.url));
}
}
6 changes: 1 addition & 5 deletions src/web/mjs/connectors/Alphapolis.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,7 @@ export default class Alphapolis extends Connector {
const data = await this.fetchDOM(request, 'viewer-manga-horizontal');
try {
const pages = JSON.parse(data[0].getAttribute('v-bind:pages'));
return pages.filter(element => typeof element != 'object' && !element.match('white_page'))
.map(element => {
const hiresPicture = element.replace(/\/[0-9]+x[0-9]+.([\w]+)/, '/1080x1536.$1');
return this.createConnectorURI({hiresPicture : hiresPicture, normalpicture : element});
});
return pages.filter(element => typeof element != 'object' && !element.match('white_page')).map(element => element.replace(/\/[0-9]+x[0-9]+.([\w]+)/, '/1080x1536.$1'));
} catch (error) {
throw new Error(`The chapter '${chapter.title}' is neither public, nor purchased!`);
}
Expand Down
154 changes: 154 additions & 0 deletions src/web/mjs/connectors/Anizero.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
import Connector from '../engine/Connector.mjs';
import BloggerVideo from '../videostreams/BloggerVideo.mjs';

export default class AniZero extends Connector {
constructor() {
super();
super.id = 'anizero';
super.label = 'AniZero';
this.tags = [ 'anime', 'spanish' ];
this.url = 'https://anizero.site';
}
async getnoonce() {
let url = new URL(this.url);
const request = new Request(url, this.requestOptions);
const scriptPages = `
new Promise(resolve => {
resolve(js_global.search_nonce);
});
`;
return await Engine.Request.fetchUI(request, scriptPages);
}
async _getMangas() {
const noonce = await this.getnoonce();
let mangaList = [];
for (let page = 1, run = true; run; page++) {
let mangas = await this._getMangasFromPage(page, noonce);
mangas.length > 0 ? mangaList.push(...mangas) : run = false;
}
return mangaList;
}
async _getMangasFromPage(page, noonce) {
let form = new URLSearchParams();
form.append('search_nonce', noonce);
form.append('action', 'show_animes_ajax');
form.append('letra', '');
form.append('paged', page);
const body = form.toString();
const url = new URL('/wp-admin/admin-ajax.php', this.url);
const request = new Request(url, {
method: 'POST',
body: body,
headers: {
'x-origin': this.url,
'x-referer': this.url,
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'X-Requested-With': 'XMLHttpRequest',
}
});
const data = await this.fetchJSON(request);
if (!data.animes) {
return [];
}
return data.animes.map(element => {
return {
id: this.getRootRelativeOrAbsoluteLink(element.anime_permalink, request.url),
title: element.anime_title.trim()
};
});
}
async _getChapters(manga) {
let chapterslist = [];
//get mangaid from page
let request = new Request( new URL(manga.id, this.url), this.requestOptions );
let data = await this.fetchDOM( request, 'link[rel="shortlink"]' );
const mangaid = data[0].getAttribute('href').match(/\?p=(\d+)/)[1];
let form = new URLSearchParams();
form.append('action', 'show_videos');
form.append('anime_id', mangaid);
const body = form.toString();
const url = new URL('/api', this.url);
request = new Request(url, {
method: 'POST',
body: body,
headers: {
'x-origin': this.url,
'x-referer': this.url,
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'X-Requested-With': 'XMLHttpRequest',
}
});
//EPISODES
let chapters = [];
data = await this.fetchJSON(request);
for (let i in data.episodios) {
let element = data.episodios[i];
chapters.push({
id: this.getRootRelativeOrAbsoluteLink(element.epi_url, this.url),
title : element.epi_num + ': '+element.epi_title.trim()
});
}
chapterslist.push(...chapters);
//OVAS
chapters = [];
for (let i in data.ovas) {
let element = data.ovas[i];
chapters.push({
id: this.getRootRelativeOrAbsoluteLink(element.epi_url, this.url),
title : '[OVA] '+ element.epi_num + ': '+element.epi_title.trim()
});
}
chapterslist.push(...chapters);
//FILMES
chapters = [];
for (let i in data.filmes) {
let element = data.filmes[i];
chapters.push({
id: this.getRootRelativeOrAbsoluteLink(element.epi_url, this.url),
title : '[FILM] '+ element.epi_num + ': '+element.epi_title.trim()
});
}
chapterslist.push(...chapters);
return chapterslist.reverse();
}
async _getPages(chapter) {
let request = new Request(new URL(chapter.id, this.url), this.requestOptions);
const script = `
new Promise((resolve, reject) => {
setTimeout(() => {
try {
resolve(players_links);
}
catch(error) {
reject(error);
}
},
3000);
});
`;
let data = await Engine.Request.fetchUI(request, script);
let videolink = Object.values(data)[0];
//remove redirector
if(videolink.match(/assistirFHD/)) {
let tmp = new URL(videolink);
videolink = decodeURI(tmp.searchParams.get("video"));
}
//if link is not already blogger
if (!videolink.match(/blogger/)) {
//fetch the dom returned by the link -its html=
request = new Request(videolink, this.requestOptions);
data = await this.fetchDOM( request, 'body');
let ele = data[0].querySelectorAll('script');
ele.forEach(node =>{
if (node.text.match(/blogger/)) {
videolink = node.text.split("'").filter(el => el.match(/blogger/))[0];
}
});
}
if (!videolink.match(/blogger/)) {
throw Error('Unsupported Video host : '+ videolink);
}
const vid = await new BloggerVideo(videolink).getStream();
return {video: vid, subtitles: [] };
}
}
16 changes: 16 additions & 0 deletions src/web/mjs/connectors/BilibiliComicsES.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import BilibiliManhua from './BilibiliManhua.mjs';

export default class BilibiliComicsES extends BilibiliManhua {

constructor() {
super();
super.id = 'bilibili-comics-es';
super.label = 'Bilibili Comics (Spanish)';
this.tags = [ 'webtoon', 'spanish' ];
this.url = 'https://www.bilibilicomics.com';
this.lang = 'es';
}
get icon() {
return '/img/connectors/bilibili-comics';
}
}
16 changes: 16 additions & 0 deletions src/web/mjs/connectors/BilibiliComicsFR.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import BilibiliManhua from './BilibiliManhua.mjs';

export default class BilibiliComicsFR extends BilibiliManhua {

constructor() {
super();
super.id = 'bilibili-comics-fr';
super.label = 'Bilibili Comics (French)';
this.tags = [ 'webtoon', 'french' ];
this.url = 'https://www.bilibilicomics.com';
this.lang = 'fr';
}
get icon() {
return '/img/connectors/bilibili-comics';
}
}
16 changes: 16 additions & 0 deletions src/web/mjs/connectors/BilibiliComicsID.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import BilibiliManhua from './BilibiliManhua.mjs';

export default class BilibiliComicsID extends BilibiliManhua {

constructor() {
super();
super.id = 'bilibili-comics-id';
super.label = 'Bilibili Comics (Indonesian)';
this.tags = [ 'webtoon', 'indonesian' ];
this.url = 'https://www.bilibilicomics.com';
this.lang = 'id';
}
get icon() {
return '/img/connectors/bilibili-comics';
}
}
Loading
Loading