From cb9b6c90108238b72cdd23f4bc3b8e1c2c8ced5c Mon Sep 17 00:00:00 2001
From: appdevelpo <56633229+appdevelpo@users.noreply.github.com>
Date: Wed, 18 Oct 2023 22:00:48 +0800
Subject: [PATCH] Create gimy.su.js
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
一個有動漫、電視劇、綜藝、電影的網站
---
repo/gimy.su.js | 98 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 98 insertions(+)
create mode 100644 repo/gimy.su.js
diff --git a/repo/gimy.su.js b/repo/gimy.su.js
new file mode 100644
index 0000000..26e0d2b
--- /dev/null
+++ b/repo/gimy.su.js
@@ -0,0 +1,98 @@
+// ==MiruExtension==
+// @name gimy
+// @version v0.0.1
+// @author appdevelpo
+// @lang zh-tw
+// @license MIT
+// @icon https://gimy.su/favicon.ico
+// @package gimy.su
+// @type bangumi
+// @webSite https://gimy.su
+// @nsfw false
+// ==/MiruExtension==
+
+export default class extends Extension {
+ async search(kw, page) {
+ const res = await this.request(`/vodsearch/${kw}----------${page}---.html`);//kw:1 電影 2 電視劇 3 綜藝 4 動漫
+ const bsxList = res.match(/
[\s\S]+?<\/div>/g);
+ const bangumi = [];
+ bsxList.forEach((element) => {
+ const url = element.match(/href="(.+?)"/)[1];
+ const title = element.match(/title="(.+?)"/)[1];
+ const cover_match = element.match(/https/);
+ const cover = cover_match ? element.match(/data-original="(.+?)"/)[1] : "https://gimy.su" + element.match(/data-original="(.+?)"/)[1];
+ bangumi.push({
+ title,
+ url: url,
+ cover,
+ });
+ });
+ return bangumi;
+ }
+
+ async latest(page) {
+ const p = parseInt(page / 4) + 1;
+ const f = parseInt(page % 4) + 1;
+ const res = await this.request(`/vod/${f}--------${p}---.html`);
+ const bsxList = res.match(/
[\s\S]+?<\/li>/g);
+ const bangumi = [];
+ bsxList.forEach((element) => {
+ const url = element.match(/href="(.+?)"/)[1];
+ const title = element.match(/title="(.+?)"/)[1];
+ const cover_match = element.match(/https/);
+ const cover = cover_match ? element.match(/data-original="(.+?)"/)[1] : "https://gimy.su" + element.match(/data-original="(.+?)"/)[1];
+ bangumi.push({
+ title,
+ url: url,
+ cover,
+ });
+ });
+ return bangumi;
+ }
+
+ async detail(url) {
+ const res = await this.request(url);
+ const res_content = res.match(/[\s\S]+?<\/div>[\S\s]+?<\/div>/)[0];
+ const patrial_cover_url = res_content.match(/url\((.+?)\)/)[1]
+ const cover = patrial_cover_url.match(/https/)?patrial_cover_url:"https://gimy.su"+patrial_cover_url;
+ const title = res_content.match(/title="(.+?)"/)[1];
+ const desc = res.match(/