diff --git a/apps/tools.js b/apps/tools.js index 66d1718..e4fb955 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -97,7 +97,7 @@ export class tools extends plugin { fnc: "bili", }, { - reg: "(x.com)", + reg: "https?:\\/\\/x.com\\/[0-9-a-zA-Z_]{1,20}\\/status\\/([0-9]*)", fnc: "twitter_x", }, { @@ -112,10 +112,6 @@ export class tools extends plugin { reg: "(instagram.com)", fnc: "instagram", }, - { - reg: "(doi.org)", - fnc: "literature", - }, { reg: "^清理data垃圾$", fnc: "clearTrash", @@ -131,7 +127,7 @@ export class tools extends plugin { fnc: "bodianMusic", }, { - reg: "(kuaishou.com|ixigua.com|share.xiaochuankeji.cn)", + reg: "(kuaishou.com|ixigua.com|share.xiaochuankeji.cn|h5.pipix.com)", fnc: "general", }, { @@ -721,28 +717,6 @@ export class tools extends plugin { return true; } - // 文献解析 - async literature(e) { - const litReg = /(http:|https:)\/\/doi.org\/[A-Za-z\d._?%&+\-=\/#@]*/; - const url = litReg.exec(e.msg.trim())[0]; - const waitList = [ - "https://sci-hub.se/", - "https://sci-hub.st/", - "https://sci-hub.do/", - "https://sci-hubtw.hkvisa.net/", - "https://sci-hub.ren/", - "https://sci-hub.ee/", - "https://sci-hub.ru/", - ]; - const flag = /doi.org\/(.*)/.exec(url)[1]; - const newWaitList = waitList.map(item => { - return item + flag; - }); - await Promise.any(newWaitList).then(resp => { - e.reply(resp); - }); - } - // 清理垃圾文件 async clearTrash(e) { const dataDirectory = "./data/"; @@ -1009,7 +983,7 @@ export class tools extends plugin { async general(e) { const linkAdapter = new GeneralLinkAdapter(e.msg); const adapter = await linkAdapter.build(); - logger.info(adapter.link) + logger.mark(adapter.link) e.reply(`识别:${adapter.name}`); // 发送GET请求 axios.get(adapter.link, { diff --git a/config/help.yaml b/config/help.yaml index b9bb45b..1dd9eb8 100644 --- a/config/help.yaml +++ b/config/help.yaml @@ -71,9 +71,9 @@ - icon: zuiyou title: "最右(测试阶段)" desc: 最右分享实时下载 - - icon: literature - title: "论文" - desc: SCI论文实时解析 + - icon: pipi + title: "皮皮虾(测试阶段)" + desc: 皮皮虾分享实时下载 - icon: bodian title: "波点音乐" desc: 波点云音乐点解析 diff --git a/config/version.yaml b/config/version.yaml index 27913cf..7d8911b 100644 --- a/config/version.yaml +++ b/config/version.yaml @@ -1,7 +1,8 @@ - { - version: 1.5.5, + version: 1.5.6, data: [ + 新增皮皮虾解析功能, 新增Pixivision解析功能, 新增微博解析功能, 新增最右解析功能, diff --git a/resources/img/icon/literature.png b/resources/img/icon/literature.png deleted file mode 100644 index c9f240d..0000000 Binary files a/resources/img/icon/literature.png and /dev/null differ diff --git a/resources/img/icon/pipi.png b/resources/img/icon/pipi.png new file mode 100644 index 0000000..1742c09 Binary files /dev/null and b/resources/img/icon/pipi.png differ diff --git a/utils/general-link-adapter.js b/utils/general-link-adapter.js index 76c47d6..b968bb0 100644 --- a/utils/general-link-adapter.js +++ b/utils/general-link-adapter.js @@ -14,6 +14,8 @@ class GeneralLinkAdapter { this.#url = this.ks(link); } else if (/ixigua.com/.test(link)) { this.#url = this.xigua(link); + } else if (/h5.pipix.com/.test(link)) { + this.#url = this.pipixia(link); } } @@ -74,6 +76,11 @@ class GeneralLinkAdapter { return {name: "西瓜", link: GENERAL_REQ_LINK.replace("{}", videoReq)}; } + async pipixia(link) { + const msg = /https:\/\/h5\.pipix\.com\/s\/[A-Za-z0-9]+/.exec(link)?.[0]; + return {name: "皮皮虾", link: GENERAL_REQ_LINK.replace("{}", msg)}; + } + async build() { return this.#url; }