From 975dd70a3c39d6973ea8ee105387fb5ec8b92f13 Mon Sep 17 00:00:00 2001 From: zhiyu1998 <542716863@qq.com> Date: Mon, 25 Mar 2024 10:25:46 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=9F=20feat:=201.5.13=20=E6=9C=80?= =?UTF-8?q?=E5=8F=B3Plus=E6=9B=B4=E6=96=B0=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 现在最右单条帖子信息,现在更加完善 --- apps/tools.js | 70 ++++++++++++++++++++++++++++++++++- config/version.yaml | 2 +- utils/general-link-adapter.js | 8 ---- 3 files changed, 69 insertions(+), 11 deletions(-) diff --git a/apps/tools.js b/apps/tools.js index 6c91e58..8b145eb 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -50,7 +50,6 @@ import { TIKTOK_INFO, TWITTER_TWEET_INFO, XHS_REQ_LINK, - XHS_VIDEO, GENERAL_REQ_LINK, WEIBO_SINGLE_INFO, WEISHI_VIDEO_INFO } from "../constants/tools.js"; import child_process from 'node:child_process' @@ -128,7 +127,7 @@ export class tools extends plugin { fnc: "bodianMusic", }, { - reg: "(kuaishou.com|ixigua.com|share.xiaochuankeji.cn|h5.pipix.com|h5.pipigx.com|tieba.baidu.com|s.xsj.qq.com)", + reg: "(kuaishou.com|ixigua.com|h5.pipix.com|h5.pipigx.com|tieba.baidu.com|s.xsj.qq.com)", fnc: "general", }, { @@ -154,6 +153,10 @@ export class tools extends plugin { { reg: "(isee.weishi.qq.com)", fnc: "weishi" + }, + { + reg: "share.xiaochuankeji.cn", + fnc: "zuiyou" } ], }); @@ -1300,6 +1303,69 @@ export class tools extends plugin { return true; } + async zuiyou(e) { + // #最右#分享一条有趣的内容给你,不好看算我输。请戳链接>>https://share.xiaochuankeji.cn/hybrid/share/post?pid=365367131&zy_to=applink&share_count=1&m=dc114ccc8e55492642f6a702b510c1f6&d=9e18ca2dace030af656baea96321e0ea353fe5c46097a7f3962b93f995641e962796dd5faa231feea5531ac65547045f&app=zuiyou&recommend=r0&name=n0&title_type=t0 + const url = /(?:https?:\/\/)?(share|share.xiaochuankeji)\.cn\/[A-Za-z\d._?%&+\-=\/#]*/.exec(e.msg)[0]; + try { + const response = await axios.get("https://share.xiaochuankeji.cn/hybrid/share/post?pid=370928872&zy_to=applink&share_count=1&m=dc114ccc8e55492642f6a702b510c1f6&d=9e18ca2dace030af656baea96321e0ea353fe5c46097a7f3962b93f995641e962796dd5faa231feea5531ac65547045f&app=zuiyou&recommend=r0&name=n0&title_type=t0", { + headers: { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36", + } + }); + const html = response.data; + + const videoUrlRegex = /fullscreen="false" src="(.*?)"/; + const videoTitleRegex = /:<\/span>