mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 08:09:19 +00:00
✨ feat: 新增 #rso
搜索功能
- 在 config/version.yaml 中新增 rso 搜索功能,优化队列下载和 GPT 功能 - 增加哔哩哔哩下载分辨率设置功能,新增自定义识别功能 - 支持锅巴插件,方便查看和修改配置 - 更新 query.js 文件,增加必应搜索功能支持 - 优化常量配置,增加 BING_SEARCH 常量,支持新的搜索功能
This commit is contained in:
parent
c4c8eaeb85
commit
0642f9d62a
@ -401,13 +401,11 @@ export class query extends plugin {
|
||||
|
||||
async rso(e) {
|
||||
const question = e.msg.replace("#Rso", "").replace("#rso", "").trim();
|
||||
logger.info(question);
|
||||
const resp = await fetch(BING_SEARCH.replace("{}", question), {
|
||||
headers: {
|
||||
"User-Agent": COMMON_USER_AGENT,
|
||||
}
|
||||
});
|
||||
logger.info(await resp);
|
||||
const respJson = (await resp.json()).data;
|
||||
const constructSearchRes = textArrayToMakeForward(e, respJson.map(item =>
|
||||
`标题:《${ item.title }》\n📝 简要:${ item.abstract }\n➡️链接:${ item.href }`
|
||||
|
Loading…
x
Reference in New Issue
Block a user