diff --git a/README.md b/README.md index d797f63..34c05b6 100644 --- a/README.md +++ b/README.md @@ -302,14 +302,11 @@ aiApiKey: '' # 用于识图的api key,kimi接口申请:https://platform.moon ## 📝 计划功能 - [x] YouTube解析(这个可能要🕊一久) -- [ ] Instagram解析修复 - - [ ] 单张图片解析 - - [ ] 视频解析 - [x] 哔哩哔哩总结 - [x] xhs解析去水印 - [x] kuai_shou解析 - [x] xi_gua视频解析 -- [ ] ... +- [ ] instagram diff --git a/apps/tools.js b/apps/tools.js index 9adfbdc..e40b4a4 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -136,10 +136,6 @@ export class tools extends plugin { reg: "(xhslink.com|xiaohongshu.com)", fnc: "xhs", }, - { - reg: "(instagram.com)", - fnc: "instagram", - }, { reg: "(h5app.kuwo.cn)", fnc: "bodianMusic", @@ -1009,82 +1005,6 @@ export class tools extends plugin { return true; } - // ins解析 - async instagram(e) { - let suffix = e.msg.match(/(?<=com\/)[\/a-z0-9A-Z].*/)[0]; - if (suffix.startsWith("reel")) { - suffix = suffix.replace("reel/", "p/"); - } - const API = `https://imginn.com/${suffix}`; - // logger.info(API); - let imgPromise = []; - const downloadPath = `${this.getCurDownloadPath(e)}`; - // 判断是否是海外服务器 - const isOversea = await this.isOverseasServer(); - // 简单封装图片下载 - const downloadInsImg = (url, destination) => { - return new Promise((resolve, reject) => { - fetch(url, { - timeout: 10000, - agent: isOversea ? '' : new HttpsProxyAgent(this.myProxy), - redirect: "follow", - follow: 10, - }) - .then(res => { - const dest = fs.createWriteStream(destination); - res.body.pipe(dest); - dest.on("finish", () => resolve(destination)); - }) - .catch(err => reject(err)); - }); - }; - await fetch(API, { - headers: { - "User-Agent": COMMON_USER_AGENT, - }, - }).then(async resp => { - const html = await resp.text(); - const desc = html.match(/(?<=content=").*?(?=\")/g)?.[2]; - const images = html.match(/