/* AppStore价格查询脚本 @anyeyey 群组:https://t.me/+A1cOYwvOdeI4MWNl 频道:https://t.me/IPAs_share boxjs:https://raw.githubusercontent.com/anyehttp/quantumult-x/main/boxjs/anye_boxjs.json surge模块:https://raw.githubusercontent.com/anyehttp/quantumult-x/main/task/AppStore.sgmodule boxjs使用方式: 数据格式 AppStore链接:https://apps.apple.com/us/app/surge-5/id1442620678?l=zh-Hans-CN 此链接中 us 就是国家 surge-5 就是名字 1442620678 是id 软件付费在应用内就是 内购 完整数据就是:{"地区":["us"], "名字":["surge-5"], "id":[1442620678], "购买方式":["内购"]} 多软件用英文 , 隔开 比如:{"地区":["us", "cn"], "名字":["surge-5", "code-app"], "id":[1442620678, 1512938504], "购买方式":["内购", "本体"]} */ const $ = new Env('App Price Checker'); // 通知函数,使用 env 通知 function notify(notice) { $.msg($.name, '', notice); console.log(notice); } // 模拟浏览器请求的请求头 const headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0', }; // 异步请求 URL 获取 HTML 内容 async function requestUrl(url) { console.log(`请求 URL: ${url}`); return new Promise((resolve, reject) => { const options = { url, headers }; $.get(options, (err, resp, body) => { if (err) { console.log(`请求错误: ${err}`); reject(err); } else { console.log(`请求成功: ${url}`); resolve(body); } }); }); } // 解析 app 本体价格 function parseAppBodyPrice(html) { const priceElement = html.match(/