diff --git a/apps/tools.js b/apps/tools.js index 6d9acd6..7b07958 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -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] || diff --git a/utils/general-link-adapter.js b/utils/general-link-adapter.js index 604d439..d3313ff 100644 --- a/utils/general-link-adapter.js +++ b/utils/general-link-adapter.js @@ -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) {