mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
🐞 fix: 删除没必要的功能 & 更新搜书功能
作者被勒索更新了,没办法,非要更新这个搜书,顺便删点垃圾功能,增强一下哔哩哔哩总结
This commit is contained in:
parent
0e166c5a1e
commit
6e4530cc31
@ -182,16 +182,14 @@ async function getZHelper(e, keyword) {
|
|||||||
const annaDataPromises = resp[1].value.data.data.slice(0, LIMIT).map(async (item) => {
|
const annaDataPromises = resp[1].value.data.data.slice(0, LIMIT).map(async (item) => {
|
||||||
const { author, cover, extension, id, link, publisher, sizestring, source, title } = item;
|
const { author, cover, extension, id, link, publisher, sizestring, source, title } = item;
|
||||||
// 固定一个模板
|
// 固定一个模板
|
||||||
let resBooks = `<${title}>\n` +
|
let resBooks = `<${title}> 作者:${author} 书籍类型:${extension}\n` +
|
||||||
`作者:${author}\n` +
|
|
||||||
`书籍类型:${extension}\n` +
|
|
||||||
`来源:${source}\n` +
|
`来源:${source}\n` +
|
||||||
`出版社:${publisher}\n` +
|
`出版社:${publisher}\n` +
|
||||||
`文件大小:${sizestring}`;
|
`文件大小:${sizestring}`;
|
||||||
// 发送一个需要下载链接的请求
|
// 发送一个需要下载链接的请求
|
||||||
const downloadLink = await getDownloadLink(id);
|
const downloadLink = await getDownloadLink(id);
|
||||||
|
|
||||||
resBooks += downloadLink;
|
resBooks += `\n${downloadLink}`;
|
||||||
return {
|
return {
|
||||||
message: {
|
message: {
|
||||||
type: "text",
|
type: "text",
|
||||||
@ -225,7 +223,7 @@ async function getDownloadLink(id) {
|
|||||||
const { download_link } = resp.data;
|
const { download_link } = resp.data;
|
||||||
|
|
||||||
const links = download_link.slice(0, 2).map((item, index) => {
|
const links = download_link.slice(0, 2).map((item, index) => {
|
||||||
return `直链 #${index}: ${item?.url}\n`
|
return `直链 #${index + 1}: ${encodeURIComponent(item?.url)}\n\n`
|
||||||
})
|
})
|
||||||
|
|
||||||
return `\n${links}`;
|
return `\n${links}`;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user