Skip to content

Commit

Permalink
Merge branch 'miru-project:main' into patch-5
Browse files Browse the repository at this point in the history
  • Loading branch information
OshekharO authored Sep 24, 2023
2 parents 3d93c25 + bed018e commit ac68740
Show file tree
Hide file tree
Showing 5 changed files with 216 additions and 29 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,21 @@ Miru extensions repository | [Miru App Download](https://github.com/miru-project
| Flixhq | flixhq.to | v0.0.1 | OshekharO | all | false | [Source Code](https://github.com/miru-project/repo/blob/main/repo/flixhq.to.js) |
| GoGoAnime | gogo.anime | v0.0.1 | OshekharO | en | false | [Source Code](https://github.com/miru-project/repo/blob/main/repo/gogo.anime.js) |
| HentaiDexy | hentaidexy.net | v0.0.1 | OshekharO | en | true | [Source Code](https://github.com/miru-project/repo/blob/main/repo/hentaidexy.net.js) |
| Invidious | invidious.io | v0.0.1 | OshekharO | all | false | [Source Code](https://github.com/miru-project/repo/blob/main/repo/invidious.io.js) |
| IsekaiScan | isekaiscan.to | v0.0.2 | bethro | en | false | [Source Code](https://github.com/miru-project/repo/blob/main/repo/isekaiscan.to.js) |
| Kissasian | kissasian.fm | v0.0.1 | OshekharO | en | false | [Source Code](https://github.com/miru-project/repo/blob/main/repo/kissasian.fm.js) |
| Kisskh | kisskh.co | v0.0.1 | OshekharO | all | false | [Source Code](https://github.com/miru-project/repo/blob/main/repo/kisskh.co.js) |
| 拷贝漫画 | mangacopy.comic | v0.0.1 | Monster | zh-cn | false | [Source Code](https://github.com/miru-project/repo/blob/main/repo/mangacopy.comic.js) |
| マンガクロス | mangacross.jp | v0.0.1 | OshekharO | jp | false | [Source Code](https://github.com/miru-project/repo/blob/main/repo/mangacross.jp.js) |
| MangaDex | mangadex.org | v0.0.1 | bethro | all | false | [Source Code](https://github.com/miru-project/repo/blob/main/repo/mangadex.org.js) |
| Mikanani | me.mikanani | v0.0.1 | MiaoMint | zh-cn | false | [Source Code](https://github.com/miru-project/repo/blob/main/repo/me.mikanan.js) |
| Mikanani | me.mikanani | v0.0.3 | MiaoMint | zh-cn | false | [Source Code](https://github.com/miru-project/repo/blob/main/repo/me.mikanani.js) |
| Enime | moe.enime | v0.0.5 | MiaoMint | all | false | [Source Code](https://github.com/miru-project/repo/blob/main/repo/moe.enime.js) |
| 轻小说文库 | moe.wol.wenku8 | v0.0.1 | NPGamma | zh-cn | false | [Source Code](https://github.com/miru-project/repo/blob/main/repo/moe.wol.wenku8.js) |
| Mtlnation | mtlnation.com | v0.0.1 | OshekharO | en | false | [Source Code](https://github.com/miru-project/repo/blob/main/repo/mtlnation.com.js) |
| TYS.mx | mx.yts | v0.0.5 | MiaoMint | all | false | [Source Code](https://github.com/miru-project/repo/blob/main/repo/mx.yts.js) |
| ReadLN | readlightnovels | v0.0.1 | OshekharO | en | false | [Source Code](https://github.com/miru-project/repo/blob/main/repo/readlightnovels.js) |
| 免费小说网 | ren.0u0.miru.mfxs | v0.0.1 | MiaoMint | zh-cn | true | [Source Code](https://github.com/miru-project/repo/blob/main/repo/ren.0u0.miru.mfxs.js) |
| ACG.RIP | rip.acg | v0.0.1 | MiaoMint | zh-cn | false | [Source Code](https://github.com/miru-project/repo/blob/main/repo/rip.acg.js) |
| 樱花动漫 | sakura | v0.0.1 | Monster | zh-cn | false | [Source Code](https://github.com/miru-project/repo/blob/main/repo/sakura.js) |
| SimplyHentai | simplyhentai.com | v0.0.1 | OshekharO | all | true | [Source Code](https://github.com/miru-project/repo/blob/main/repo/simplyhentai.com.js) |
| 好看的1号 | top.lkp2.www | v0.0.1 | zj | zh-cn | true | [Source Code](https://github.com/miru-project/repo/blob/main/repo/top.lkp2.www.js) |
Expand Down
28 changes: 26 additions & 2 deletions index.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,18 @@
"version": "v0.0.1",
"webSite": "https://backend.hentaidexy.net"
},
{
"author": "OshekharO",
"icon": "https://invidious.io/apple-touch-icon.png",
"lang": "all",
"license": "MIT",
"name": "Invidious",
"package": "invidious.io",
"type": "bangumi",
"url": "invidious.io.js",
"version": "v0.0.1",
"webSite": "https://invidious.slipfox.xyz/api/v1"
},
{
"author": "bethro",
"icon": "https://sp-ao.shortpixel.ai/client/to_webp,q_glossy,ret_img,w_192,h_192/https://m.isekaiscan.to/wp-content/uploads/2023/03/0_20230304_101820_0000-300x300.png",
Expand Down Expand Up @@ -241,8 +253,8 @@
"name": "Mikanani",
"package": "me.mikanani",
"type": "bangumi",
"url": "me.mikanan.js",
"version": "v0.0.1",
"url": "me.mikanani.js",
"version": "v0.0.3",
"webSite": "https://mikanani.me"
},
{
Expand Down Expand Up @@ -320,6 +332,18 @@
"version": "v0.0.1",
"webSite": "https://www.493d.com/"
},
{
"author": "MiaoMint",
"icon": "http://r.photo.store.qq.com/psb?/V12tx9ch2GA3dz/FqLQBHE23P.c*XKPM4RI*6*aL0mdnoww*2zSjghMKn8!/r/dPIAAAAAAAAA",
"lang": "zh-cn",
"license": "MIT",
"name": "ACG.RIP",
"package": "rip.acg",
"type": "bangumi",
"url": "rip.acg.js",
"version": "v0.0.1",
"webSite": "https://acg.rip"
},
{
"author": "Monster",
"icon": "https://cdn.yinghuazy.xyz/webjs/zkk7/statics/img/favicon.ico",
Expand Down
80 changes: 80 additions & 0 deletions repo/invidious.io.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// ==MiruExtension==
// @name Invidious
// @version v0.0.1
// @author OshekharO
// @lang all
// @license MIT
// @icon https://invidious.io/apple-touch-icon.png
// @package invidious.io
// @type bangumi
// @webSite https://invidious.slipfox.xyz/api/v1
// ==/MiruExtension==

export default class extends Extension {
async latest() {
const res = await this.request(`/trending`);

if (!Array.isArray(res)) {
// Handle the case when the response is not an array
return [];
}

return res.map((item) => ({
title: item.title || "",
url: item.videoId || "",
cover: item.videoThumbnails?.[0]?.url || "", // Use the first thumbnail's URL if available
}));
}

async search(kw) {
const res = await this.request(`/search?q=${kw}`);

return res.map((item) => ({
title: item.title || "",
url: item.videoId || "",
cover: item.videoThumbnails?.[0]?.url || "",
}));
}

async detail(url) {
const res = await this.request(`/videos/${url}`);
return {
title: res.title,
cover: res.videoThumbnails?.[0]?.url,
desc: res.description,
episodes: [
{
title: "Watch",
urls: [
{
name: res.title,
url: res.videoId,
},
],
},
],
};
}

async watch(url) {
const res = await this.request(`/videos/${url}`);

const sub = await this.request(`/streams/${url}`, {
headers: {
"Miru-Url": "https://pipedapi.kavin.rocks",
},
});

const subtitles = sub.subtitles.map((item) => ({
title: item.name,
url: item.url,
language: item.code,
}));

return {
type: "hls",
url: res.formatStreams?.[2]?.url,
subtitles: subtitles,
};
}
}
52 changes: 26 additions & 26 deletions repo/me.mikanan.js → repo/me.mikanani.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==MiruExtension==
// @name Mikanani
// @version v0.0.1
// @version v0.0.3
// @author MiaoMint
// @lang zh-cn
// @license MIT
Expand All @@ -23,7 +23,7 @@ export default class extends Extension {
defaultValue: "https://mikanani.me",
options: {
"https://mikanani.me": "https://mikanani.me",
"https://mikanani.tv": "https://mikanani.tv",
"https://mikanime.tv": "https://mikanime.tv",
},
});
}
Expand Down Expand Up @@ -152,28 +152,28 @@ export default class extends Extension {
});
}

const episodeGrups = [];

for (const item of subtitleGrups) {
const res = await this.req(
`/Home/ExpandEpisodeTable?bangumiId=${bangumiId}&subtitleGroupId=${item.subtitleId}&take=999999`
);
const trs = await this.querySelectorAll(res, "tbody tr");
const episodes = [];
for (const item of trs) {
const html = item.content;
const name = await this.querySelector(html, "a").text;
const url = html.match(/\/Download\/.*\.torrent/)[0];
episodes.push({
name,
url,
});
}
episodeGrups.push({
title: item.name,
urls: episodes,
});
}
const episodeGrups = await Promise.all(
subtitleGrups.map(async (item) => {
const res = await this.req(
`/Home/ExpandEpisodeTable?bangumiId=${bangumiId}&subtitleGroupId=${item.subtitleId}&take=999999`
);
const trs = await this.querySelectorAll(res, "tbody tr");
const episodes = [];
for (const item of trs) {
const html = item.content;
const name = await this.querySelector(html, "a").text;
const url = html.match(/\/Download\/.*\.torrent/)[0];
episodes.push({
name,
url,
});
}
return {
title: item.name,
urls: episodes,
};
})
);

return {
title,
Expand All @@ -185,9 +185,9 @@ export default class extends Extension {

async search(kw, page, filter) {
if (!filter) {
return await this.latest()
return await this.latest();
}
return await this.getData(filter.year, filter.season)
return await this.getData(filter.year, filter.season);
}

async watch(url) {
Expand Down
81 changes: 81 additions & 0 deletions repo/rip.acg.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
// ==MiruExtension==
// @name ACG.RIP
// @version v0.0.1
// @author MiaoMint
// @lang zh-cn
// @license MIT
// @icon http://r.photo.store.qq.com/psb?/V12tx9ch2GA3dz/FqLQBHE23P.c*XKPM4RI*6*aL0mdnoww*2zSjghMKn8!/r/dPIAAAAAAAAA
// @package rip.acg
// @type bangumi
// @webSite https://acg.rip
// ==/MiruExtension==

export default class extends Extension {
async createFilter(filter) {}

async getFullUrl(url) {
return `https://acg.rip${url}`;
}

async getItemList(html) {
const trs = await this.querySelectorAll(html, "tbody tr");
const items = [];
for (const item of trs) {
const html = item.content;
const a = this.querySelector(html, ".title a");
const title = await a.text;
console.log(a.content);
const url = await this.getAttributeText(
a.content,
"a:nth-child(1)",
"href"
);
items.push({
title,
url,
});
}
return items;
}

async latest(page) {
const res = await this.request(`/1/page/${page}`);
return await this.getItemList(res);
}

async detail(url) {
const res = await this.request(url);
const title = (
await this.querySelector(res, ".panel-default .panel-heading").text
).trim();
const desc = await this.querySelector(res, ".post-content").text;
return {
title,
desc,
episodes: [
{
title: "种子",
urls: [
{
name: "在线观看",
url: await this.getAttributeText(res, ".panel-body .btn", "href"),
},
],
},
],
};
}

async search(kw, page, filter) {
const res = await this.request(`/page/${page}?term=${kw}`);
return this.getItemList(res);
}

async watch(url) {
return {
type: "torrent",
url: await this.getFullUrl(url),
};
}
}

0 comments on commit ac68740

Please sign in to comment.