feat: V1.6.2 通用解析新增即刻解析

This commit is contained in:
zhiyu1998 2024-04-01 13:31:59 +08:00
parent c87fce3110
commit 88849fedd3
4 changed files with 23 additions and 3 deletions

View File

@ -127,7 +127,7 @@ export class tools extends plugin {
fnc: "bodianMusic",
},
{
reg: "(kuaishou.com|ixigua.com|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|m.okjike.com)",
fnc: "general",
},
{

View File

@ -1,7 +1,8 @@
- {
version: 1.6.1,
version: 1.6.2,
data:
[
新增<span class="cmd">即刻解析</span>功能,
新增<span class="cmd">微视解析</span>功能,
新增<span class="cmd">小世界解析</span>功能,
新增<span class="cmd">贴吧解析</span>功能,

View File

@ -90,6 +90,11 @@ export const GENERAL_REQ_LINK_2 = {
sign: 2
}
export const GENERAL_REQ_LINK_3 = {
link: "https://picseed.com/v1/parser?auth_key=1E9DC25C-E75F-11EE-A0DD-0A5A298C6C2D&content={}",
sign: 3
}
/**
* 获取网易云歌曲下载链接
* @type {string}

View File

@ -1,6 +1,6 @@
import {
GENERAL_REQ_LINK,
GENERAL_REQ_LINK_2
GENERAL_REQ_LINK_2, GENERAL_REQ_LINK_3
} from "../constants/tools.js";
/**
@ -105,6 +105,13 @@ class GeneralLinkAdapter {
return { name: "QQ小世界", reqLink };
}
async jike(link) {
// https://m.okjike.com/originalPosts/6583b4421f0812cca58402a6?s=ewoidSI6ICI1YTgzMTY4ZmRmNDA2MDAwMTE5N2MwZmQiCn0=
const msg = /https:\/\/m.okjike.com\/originalPosts\/[A-Za-z0-9]+/.exec(link)?.[0];
const reqLink = this.createReqLink(GENERAL_REQ_LINK_3, msg);
return { name: "即刻", reqLink };
}
/**
* 初始化通用适配器
* @param link 通用链接
@ -119,6 +126,7 @@ class GeneralLinkAdapter {
[/h5.pipigx.com/, this.pipigx.bind(this)],
[/tieba.baidu.com/, this.tieba.bind(this)],
[/xsj.qq.com/, this.qqSmallWorld.bind(this)],
[/m.okjike.com/, this.jike.bind(this)],
]);
for (let [regex, handler] of handlers) {
@ -169,6 +177,12 @@ class GeneralLinkAdapter {
video: data.data?.videoUrl,
desc: data.data?.desc
}
} else if (sign === 3) {
console.log(data)
return {
name: adapter.name,
images: data?.images.map(item => item.url),
}
} else {
throw Error("[R插件][通用解析]错误Sign标识");
}