mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
✨ feat: 使用临时方案解决 dy 动图无法解析问题
This commit is contained in:
parent
c9c38ff10a
commit
58ceb8f5dd
@ -355,6 +355,11 @@ export class tools extends plugin {
|
||||
ttwid = ttwidValue;
|
||||
douUrl = location
|
||||
}
|
||||
// TODO 如果有新的好解决方案可以删除,如果遇到https://www.iesdouyin.com/share/slides,这类动图暂时交付给其他API解析
|
||||
if (douUrl.includes("share/slides")) {
|
||||
this.general(e);
|
||||
return;
|
||||
}
|
||||
// 获取 ID
|
||||
const douId = /note\/(\d+)/g.exec(douUrl)?.[1] ||
|
||||
/video\/(\d+)/g.exec(douUrl)?.[1] ||
|
||||
|
@ -113,6 +113,12 @@ class GeneralLinkAdapter {
|
||||
return { name: "即刻", reqLink };
|
||||
}
|
||||
|
||||
async douyinBackup(link) {
|
||||
const msg = /(http:\/\/|https:\/\/)v.douyin.com\/[A-Za-z\d._?%&+\-=\/#]*/.exec(link)?.[0];
|
||||
const reqLink = this.createReqLink(GENERAL_REQ_LINK, msg);
|
||||
return { name: "抖音动图", reqLink };
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化通用适配器
|
||||
* @param link 通用链接
|
||||
@ -128,6 +134,7 @@ class GeneralLinkAdapter {
|
||||
[/tieba.baidu.com/, this.tieba.bind(this)],
|
||||
[/xsj.qq.com/, this.qqSmallWorld.bind(this)],
|
||||
[/m.okjike.com/, this.jike.bind(this)],
|
||||
[/v.douyin.com/, this.douyinBackup.bind(this)],
|
||||
]);
|
||||
|
||||
for (let [regex, handler] of handlers) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user