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

Added 4 comic extensions #180

Merged
merged 9 commits into from
Jan 31, 2024
Merged
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Miru extensions repository | [Miru App Download](https://github.com/miru-project
| Comrademao | comrademao | v0.0.3 | OshekharO | en | fikushon | [Source Code](https://github.com/miru-project/repo/blob/main/repo/comrademao.js) |
| 7喜影院 | dev.0n0.miru.7xi | v0.0.7 | MiaoMint | zh-cn | bangumi | [Source Code](https://github.com/miru-project/repo/blob/main/repo/dev.0n0.miru.7xi.js) |
| DramaCool | dramacool.pa | v0.0.2 | OshekharO | en | bangumi | [Source Code](https://github.com/miru-project/repo/blob/main/repo/dramacool.pa.js) |
| FlameComics | flamecomics.com | v0.0.1 | bethro | en | manga | [Source Code](https://github.com/miru-project/repo/blob/main/repo/flamecomics.com.js) |
| FlimyPujab | flimypujab.com | v0.0.2 | appdevelpo | hi | bangumi | [Source Code](https://github.com/miru-project/repo/blob/main/repo/flimypujab.com.js) |
| Flixhq | flixhq.to | v0.0.4 | OshekharO | all | bangumi | [Source Code](https://github.com/miru-project/repo/blob/main/repo/flixhq.to.js) |
| GakiArchives | gakiarchives.com | v0.0.1 | bachig26 | en | bangumi | [Source Code](https://github.com/miru-project/repo/blob/main/repo/gakiarchives.com.js) |
Expand All @@ -41,10 +42,12 @@ Miru extensions repository | [Miru App Download](https://github.com/miru-project
| KimCartoon | kimcartoon.li | v0.0.2 | OshekharO | en | bangumi | [Source Code](https://github.com/miru-project/repo/blob/main/repo/kimcartoon.li.js) |
| Kissasian | kissasian.fm | v0.0.1 | OshekharO | en | bangumi | [Source Code](https://github.com/miru-project/repo/blob/main/repo/kissasian.fm.js) |
| Kisskh | kisskh.co | v0.0.2 | OshekharO | all | bangumi | [Source Code](https://github.com/miru-project/repo/blob/main/repo/kisskh.co.js) |
| Komikcast | komikcast.lol | v0.0.1 | bethro | all | manga | [Source Code](https://github.com/miru-project/repo/blob/main/repo/komikcast.lol.js) |
| Letv影院 | letv.im | v0.0.1 | appdevelpo | zh | bangumi | [Source Code](https://github.com/miru-project/repo/blob/main/repo/letv.im.js) |
| libvio | libvio.pro | v0.0.2 | appdevelpo | zh | bangumi | [Source Code](https://github.com/miru-project/repo/blob/main/repo/libvio.pro.js) |
| LayarKaca | lk21official | v0.0.1 | OshekharO | id | bangumi | [Source Code](https://github.com/miru-project/repo/blob/main/repo/lk21official.js) |
| MangaLife | manga4life.com | v0.0.1 | appdevelpo | en | manga | [Source Code](https://github.com/miru-project/repo/blob/main/repo/manga4life.com.js) |
| MangaBat | mangabat.com | v0.0.1 | bethro | en | manga | [Source Code](https://github.com/miru-project/repo/blob/main/repo/mangabat.com.js) |
| 拷贝漫画 | mangacopy.comic | v0.0.1 | Monster | zh-cn | manga | [Source Code](https://github.com/miru-project/repo/blob/main/repo/mangacopy.comic.js) |
| マンガクロス | mangacross.jp | v0.0.1 | OshekharO | jp | manga | [Source Code](https://github.com/miru-project/repo/blob/main/repo/mangacross.jp.js) |
| MangaDex | mangadex.org | v0.0.2 | bethro | all | manga | [Source Code](https://github.com/miru-project/repo/blob/main/repo/mangadex.org.js) |
Expand All @@ -62,6 +65,7 @@ Miru extensions repository | [Miru App Download](https://github.com/miru-project
| Nimegami | nimegami.id | v0.0.2 | JerukPurut404 | id | bangumi | [Source Code](https://github.com/miru-project/repo/blob/main/repo/nimegami.id.js) |
| Nyaa | nyaa.si | v0.0.1 | appdevelpo | en | bangumi | [Source Code](https://github.com/miru-project/repo/blob/main/repo/nyaa.si.js) |
| Piped | piped.video | v0.0.1 | bethro | all | bangumi | [Source Code](https://github.com/miru-project/repo/blob/main/repo/piped.video.js) |
| Ravenscans | ravenscans.com | v0.0.1 | bethro | en | manga | [Source Code](https://github.com/miru-project/repo/blob/main/repo/ravenscans.com.js) |
| rawkuma | rawkuma.com | v0.0.2 | appdevelpo | jp | manga | [Source Code](https://github.com/miru-project/repo/blob/main/repo/rawkuma.com.js) |
| ReadComicsOnline | readcomicsonline.ru | v0.0.1 | OshekharO | en | manga | [Source Code](https://github.com/miru-project/repo/blob/main/repo/readcomicsonline.ru.js) |
| ReadLN | readlightnovels | v0.0.2 | OshekharO | en | fikushon | [Source Code](https://github.com/miru-project/repo/blob/main/repo/readlightnovels.js) |
Expand Down
48 changes: 48 additions & 0 deletions index.json
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,18 @@
"version": "v0.0.1",
"webSite": "https://eroticmv.com"
},
{
"author": "bethro",
"icon": "https://flamecomics.com/wp-content/uploads/2021/03/cropped-fds-1-192x192.png",
"lang": "en",
"license": "MIT",
"name": "FlameComics",
"package": "flamecomics.com",
"type": "manga",
"url": "flamecomics.com.js",
"version": "v0.0.1",
"webSite": "https://flamecomics.com/"
},
{
"author": "appdevelpo",
"icon": "https://111.90.151.26/wp-content/uploads/2020/06/cropped-Logo-2-60x60.png",
Expand Down Expand Up @@ -554,6 +566,18 @@
"version": "v0.0.2",
"webSite": "https://kisskh.co"
},
{
"author": "bethro",
"icon": "https://komikcast.lol/wp-content/uploads/2021/02/cropped-logo-kc-180x180.png",
"lang": "all",
"license": "MIT",
"name": "Komikcast",
"package": "komikcast.lol",
"type": "manga",
"url": "komikcast.lol.js",
"version": "v0.0.1",
"webSite": "https://komikcast.lol"
},
{
"author": "appdevelpo",
"icon": "https://letv.im/template/letv/asset/img/favicon.png",
Expand Down Expand Up @@ -604,6 +628,18 @@
"version": "v0.0.1",
"webSite": "https://www.manga4life.com"
},
{
"author": "bethro",
"icon": "https://h.mangabat.com/favicon-96x96.png",
"lang": "en",
"license": "MIT",
"name": "MangaBat",
"package": "mangabat.com",
"type": "manga",
"url": "mangabat.com.js",
"version": "v0.0.1",
"webSite": "https://h.mangabat.com"
},
{
"author": "Monster",
"icon": "https://hi77-overseas.mangafuna.xyz/static/free.ico",
Expand Down Expand Up @@ -921,6 +957,18 @@
"version": "v0.0.1",
"webSite": "https://www.pornxp.com"
},
{
"author": "bethro",
"icon": "https://i0.wp.com/ravenscans.com/wp-content/uploads/2022/12/cropped-33-192x192.png",
"lang": "en",
"license": "MIT",
"name": "Ravenscans",
"package": "ravenscans.com",
"type": "manga",
"url": "ravenscans.com.js",
"version": "v0.0.1",
"webSite": "https://ravenscans.com"
},
{
"author": "appdevelpo",
"icon": "https://rawkuma.com/wp-content/uploads/2020/01/cropped-Yuna.Kuma_.Kuma_.Kuma_.Bear_.full_.2385251-32x32.png",
Expand Down
116 changes: 116 additions & 0 deletions repo/flamecomics.com.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
// ==MiruExtension==
// @name FlameComics
// @version v0.0.1
// @author bethro
// @lang en
// @license MIT
// @icon https://flamecomics.com/wp-content/uploads/2021/03/cropped-fds-1-192x192.png
// @package flamecomics.com
// @type manga
// @webSite https://flamecomics.com/
// ==/MiruExtension==

export default class extends Extension {
async req(url) {
return this.request(url, {
headers: {
"Miru-Url": await this.getSetting("flamecomics"),
},
});
}

async load() {
this.registerSetting({
title: "Flame Comics Base URL",
key: "flamecomics",
type: "input",
desc: "This is the URL where the comics are fetched from",
defaultValue: "https://flamecomics.com",
});
}

async latest(page) {
let res = await this.req(`/series/?page=${page}&order=update`);

let items = await this.querySelectorAll(res, "div.listupd > div.bs > div.bsx");

let respItems = await Promise.all(items.map(async (item) => ({
url: await this.getAttributeText(item.content, "a", "href"),
cover: await this.getAttributeText(item.content, "img", "src"),
title: await this.getAttributeText(item.content, "a", "title")
})))

return respItems
}

async search(kw, page) {
let res = await this.req(`/page/${page}/?s=${kw}`);

let items = await this.querySelectorAll(res, "div.listupd > div.bs > div.bsx");

let respItems = await Promise.all(items.map(async (item) => ({
url: await this.getAttributeText(item.content, "a", "href"),
cover: await this.getAttributeText(item.content, "img", "src"),
title: await this.getAttributeText(item.content, "a", "title")
})))
return respItems;
}

async detail(url) {
// Implement the detail method to get details of a specific comic
let res = await this.request('',{
headers: {
"Miru-Url": url,
}
})

let title = await this.querySelector(res, "title").text
const cover = await this.querySelector(res, "img.wp-post-image").getAttributeText("src");

const desclist = await this.querySelectorAll(res, "div.entry-content.entry-content-single > p");
const desc = await Promise.all(desclist.map(async (element) => {
const decHtml = await element.content;
return await this.querySelector(decHtml, "p").text;
})).then((texts) => texts.join(""));

const epiList = await this.querySelectorAll(res, "#chapterlist > ul > li");
const episodes = await Promise.all(epiList.map(async (element) => {
const html = await element.content;
const name = (await this.querySelector(html, "span.chapternum").text).trim().replace(/[\n\t]/g, '');;
const url = await this.getAttributeText(html, "a", "href");
return {
name,
url: url,
};
}));

return {
title,
cover,
desc,
episodes: [
{
title: "Chapters",
urls: episodes,
},
],
};
}

async watch(url) {
const res = await this.request("", {
headers: {
"Miru-Url": url,
},
});

const images = await Promise.all((await this.querySelectorAll(res, "div#readerarea > p > img")).map(async (element) => {
const html = await element.content;
return this.getAttributeText(html, "img", "src");
}));

return {
urls: images,
};
}
}
107 changes: 107 additions & 0 deletions repo/komikcast.lol.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
// ==MiruExtension==
// @name Komikcast
// @version v0.0.1
// @author bethro
// @lang all
// @license MIT
// @icon https://komikcast.lol/wp-content/uploads/2021/02/cropped-logo-kc-180x180.png
// @package komikcast.lol
// @type manga
// @webSite https://komikcast.lol
// ==/MiruExtension==

export default class extends Extension {
async req(url) {
return this.request(url, {
headers: {
"Miru-Url": await this.getSetting("komikcast"),
},
});
}

async load() {
this.registerSetting({
title: "Komikcast Base URL",
key: "komikcast",
type: "input",
desc: "This is the URL where the comics are fetched from",
defaultValue: "https://komikcast.lol",
});
}

async latest(page) {
let res = await this.req(`/daftar-komik/page/${page}/?orderby=update`);

let items = await this.querySelectorAll(res, "div.list-update > div.list-update_items > div.list-update_items-wrapper > div");

let respItems = await Promise.all(items.map(async (item) => ({
url: await this.getAttributeText(item.content, "a.data-tooltip", "href"),
cover: await this.getAttributeText(item.content, "img", "src"),
title: (await this.querySelector(item.content, "div.list-update_item-info > h3").text).trim()
})))

return respItems
}

async search(kw, page) {
let res = await this.req(`/page/${page}/?s=${kw}`);

let items = await this.querySelectorAll(res, "div.list-update_items > div.list-update_items-wrapper > div");

let respItems = await Promise.all(items.map(async (item) => ({
url: await this.getAttributeText(item.content, "a.data-tooltip", "href"),
cover: await this.getAttributeText(item.content, "img", "src"),
title: (await this.querySelector(item.content, "div.list-update_item-info > h3").text).trim()
})))

return respItems
}

async detail(url) {
let detailResponse = await this.request('',{
headers: {
"Miru-Url": url,
},
});

const title = (await this.querySelector(detailResponse, "div.komik_info-content > div.komik_info-content-body > h1").text).trim();
const cover = await this.getAttributeText(detailResponse, "div.komik_info-content > div.komik_info-content-thumbnail > img", "src");
const desc = await this.querySelector(detailResponse, "div.komik_info-description > div > p").text;

const episodeList = await this.querySelectorAll(detailResponse, "#chapter-wrapper > li.komik_info-chapters-item");

const episodes = await Promise.all(episodeList.map(async (item) => ({
url: await this.getAttributeText(item.content, "a.chapter-link-item", "href"),
name: (await this.querySelector(item.content, "a.chapter-link-item").text).trim().replace(/[\n\t]/g, '')
})))

return {
title,
cover,
desc,
episodes: [
{
title: "Chapters",
urls: episodes,
}
]
};
}

async watch(url) {
const res = await this.request("", {
headers: {
"Miru-Url": url,
},
});

const images = await Promise.all((await this.querySelectorAll(res, "div.main-reading-area > img")).map(async (element) => {
const html = await element.content;
return this.getAttributeText(html, "img", "src");
}));

return {
urls: images,
};
}
}
Loading
Loading