mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 08:09:19 +00:00
❌ del: 删除冷门功能-评分
This commit is contained in:
parent
5011aa5d3d
commit
3f90a5701b
@ -24,10 +24,6 @@ export class query extends plugin {
|
|||||||
reg: "^#医药查询(.*)$",
|
reg: "^#医药查询(.*)$",
|
||||||
fnc: "doctor",
|
fnc: "doctor",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
reg: "^#评分(.*)",
|
|
||||||
fnc: "videoScore",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
reg: "^#(cat)$",
|
reg: "^#(cat)$",
|
||||||
fnc: "cat",
|
fnc: "cat",
|
||||||
@ -98,47 +94,6 @@ export class query extends plugin {
|
|||||||
return !!this.reply(await Bot.makeForwardMsg(msg));
|
return !!this.reply(await Bot.makeForwardMsg(msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
async videoScore(e) {
|
|
||||||
let keyword = e.msg.replace("#评分", "").trim();
|
|
||||||
const api = `https://movie.douban.com/j/subject_suggest?q=${encodeURI(keyword)}`;
|
|
||||||
|
|
||||||
let movieId = 30433417;
|
|
||||||
fetch(api, {
|
|
||||||
Headers: {
|
|
||||||
"User-Agent":
|
|
||||||
"Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.25 Mobile Safari/537.36",
|
|
||||||
"Content-Type": "application/json",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
.then(resp => resp.json())
|
|
||||||
.then(resp => {
|
|
||||||
if (resp.length === 0 || resp === "") {
|
|
||||||
e.reply("没找到!");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
movieId = resp[0].id;
|
|
||||||
const doubanApi = `https://movie.querydata.org/api?id=${movieId}`;
|
|
||||||
fetch(doubanApi, {
|
|
||||||
Headers: {
|
|
||||||
"User-Agent":
|
|
||||||
"Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.25 Mobile Safari/537.36",
|
|
||||||
"Content-Type": "application/json",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
.then(resp => resp.json())
|
|
||||||
.then(resp => {
|
|
||||||
if (resp.length === 0 || resp === "") {
|
|
||||||
e.reply("没找到!");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
e.reply(
|
|
||||||
`识别:${resp.data[0].name}\n烂番茄评分:${resp.imdbRating}\n豆瓣评分:${resp.doubanRating}\n评分:${resp.imdbRating}`,
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
async cat(e) {
|
async cat(e) {
|
||||||
let images = [];
|
let images = [];
|
||||||
let reqRes = [
|
let reqRes = [
|
||||||
|
@ -6,9 +6,6 @@
|
|||||||
- icon: cat
|
- icon: cat
|
||||||
title: "#cat 开始吸猫"
|
title: "#cat 开始吸猫"
|
||||||
desc: 猫咪图捕捉
|
desc: 猫咪图捕捉
|
||||||
- icon: hot
|
|
||||||
title: "#评分 xxx"
|
|
||||||
desc: 电影评分
|
|
||||||
- icon: computer
|
- icon: computer
|
||||||
title: "#推荐软件"
|
title: "#推荐软件"
|
||||||
desc: 推荐PC、Android软件
|
desc: 推荐PC、Android软件
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB |
Loading…
x
Reference in New Issue
Block a user