mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
✨ feat: 增加秒传书籍 & 修复bookid问题
This commit is contained in:
parent
9162a7d6b2
commit
931833e8bc
@ -491,7 +491,7 @@ export class query extends plugin {
|
|||||||
|
|
||||||
// 通过id搜书
|
// 通过id搜书
|
||||||
async searchBookById(e) {
|
async searchBookById(e) {
|
||||||
let keyword = e.msg.replace(/#|bookkey/g, "").trim();
|
let keyword = e.msg.replace(/#bookid/, "").trim();
|
||||||
let id, source;
|
let id, source;
|
||||||
if (keyword.includes(" ")) {
|
if (keyword.includes(" ")) {
|
||||||
[id, source] = keyword.split(" ");
|
[id, source] = keyword.split(" ");
|
||||||
@ -546,10 +546,30 @@ export class query extends plugin {
|
|||||||
source: source || "zlibrary",
|
source: source || "zlibrary",
|
||||||
})
|
})
|
||||||
.then(resp => {
|
.then(resp => {
|
||||||
const detailData = resp.data;
|
const {
|
||||||
const Libgen = `https://libgendown.1kbtool.com/${detailData.md5}`;
|
author,
|
||||||
const ipfs = `https://ipfs-checker.1kbtool.com/${detailData.ipfs_cid}`;
|
extension,
|
||||||
e.reply(`方式一:${Libgen}\n` + `方式二:${ipfs}`);
|
filesize,
|
||||||
|
id,
|
||||||
|
in_libgen,
|
||||||
|
ipfs_cid,
|
||||||
|
md5,
|
||||||
|
publisher,
|
||||||
|
source,
|
||||||
|
title,
|
||||||
|
year,
|
||||||
|
} = resp.data;
|
||||||
|
const Libgen = `https://libgendown.1kbtool.com/${md5}`;
|
||||||
|
const ipfs = `https://ipfs-checker.1kbtool.com/${ipfs_cid}?filename=${encodeURIComponent(title)}_${source}-search.${extension}`;
|
||||||
|
const reqUrl = `${md5}#${filesize}#${encodeURIComponent(title)}_${author}_${id}_${source}-search.${extension}`;
|
||||||
|
const cleverPass = `https://rapidupload.1kbtool.com/${reqUrl}`;
|
||||||
|
const cleverPass2 = `https://rulite.1kbtool.com/${reqUrl}`;
|
||||||
|
e.reply(
|
||||||
|
`方式1:${Libgen}\n\n` +
|
||||||
|
`方式2:${ipfs}\n\n` +
|
||||||
|
`方式3:${cleverPass}\n\n` +
|
||||||
|
`方式4:${cleverPass2}`,
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user