@iflyrpa/actions 3.0.0-beta.2 → 3.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +584 -11
- package/dist/bundle.js.map +1 -1
- package/dist/index.js +32 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +32 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.mjs
CHANGED
|
@@ -22,6 +22,7 @@ import * as __WEBPACK_EXTERNAL_MODULE_axios__ from "axios";
|
|
|
22
22
|
import * as __WEBPACK_EXTERNAL_MODULE_node_fetch_7c57b483__ from "node-fetch";
|
|
23
23
|
import * as __WEBPACK_EXTERNAL_MODULE_form_data_cf000082__ from "form-data";
|
|
24
24
|
import * as __WEBPACK_EXTERNAL_MODULE_node_https_626f33a7__ from "node:https";
|
|
25
|
+
import * as __WEBPACK_EXTERNAL_MODULE_fzstd__ from "fzstd";
|
|
25
26
|
import * as __WEBPACK_EXTERNAL_MODULE_node_http_2dc67212__ from "node:http";
|
|
26
27
|
import * as __WEBPACK_EXTERNAL_MODULE_image_size_bc738ffb__ from "image-size";
|
|
27
28
|
import * as __WEBPACK_EXTERNAL_MODULE_vm__ from "vm";
|
|
@@ -5433,7 +5434,7 @@ function __webpack_require__(moduleId) {
|
|
|
5433
5434
|
return module;
|
|
5434
5435
|
};
|
|
5435
5436
|
})();
|
|
5436
|
-
var package_namespaceObject = JSON.parse('{"i8":"3.0.0-beta.
|
|
5437
|
+
var package_namespaceObject = JSON.parse('{"i8":"3.0.0-beta.2"}');
|
|
5437
5438
|
var dist = __webpack_require__("../../node_modules/.pnpm/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/index.js");
|
|
5438
5439
|
async function ProxyAgent(task, ip, adr, accountId, refresh) {
|
|
5439
5440
|
const http = new Http({
|
|
@@ -5451,7 +5452,11 @@ async function ProxyAgent(task, ip, adr, accountId, refresh) {
|
|
|
5451
5452
|
url: "http://172.29.194.32:9998/pool/eip/proxy",
|
|
5452
5453
|
data: params
|
|
5453
5454
|
}).catch((err)=>{
|
|
5454
|
-
throw
|
|
5455
|
+
throw {
|
|
5456
|
+
code: 414,
|
|
5457
|
+
message: `请求代理失败:${err.message}`,
|
|
5458
|
+
data: {}
|
|
5459
|
+
};
|
|
5455
5460
|
});
|
|
5456
5461
|
const loggerInfo = {
|
|
5457
5462
|
params,
|
|
@@ -12797,8 +12802,11 @@ const douyinGetMusic = async (_task, params)=>{
|
|
|
12797
12802
|
browser_version: userAgent,
|
|
12798
12803
|
browser_online: "true",
|
|
12799
12804
|
timezone_name: "Asia/Shanghai",
|
|
12800
|
-
support_h265: "1"
|
|
12805
|
+
support_h265: "1",
|
|
12806
|
+
a_bogus: ""
|
|
12801
12807
|
};
|
|
12808
|
+
const authQueryBefore = new URLSearchParams(authorizationParams).toString();
|
|
12809
|
+
authorizationParams.a_bogus = douyinGetMusic_getABogus(`https://creator.douyin.com/web/api/media/aweme/search/post/auth/?${authQueryBefore}`, {}, userAgent);
|
|
12802
12810
|
const authorizationQueryString = new URLSearchParams(authorizationParams).toString();
|
|
12803
12811
|
const authorization = await http.api({
|
|
12804
12812
|
method: "get",
|
|
@@ -12817,20 +12825,36 @@ const douyinGetMusic = async (_task, params)=>{
|
|
|
12817
12825
|
total: 0
|
|
12818
12826
|
});
|
|
12819
12827
|
console.log("抖音获取音乐权限:", authorization);
|
|
12820
|
-
const
|
|
12828
|
+
const musicRes = await http.api({
|
|
12821
12829
|
method: "get",
|
|
12822
12830
|
url: `https://tsearch.amemv.com/openapi/aweme/v1/music/search/?${queryString}`,
|
|
12823
12831
|
headers: {
|
|
12824
|
-
|
|
12832
|
+
Accept: "application/json, text/plain, */*",
|
|
12833
|
+
"Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7",
|
|
12834
|
+
"cache-control": "no-cache",
|
|
12835
|
+
pragma: "no-cache",
|
|
12836
|
+
priority: "u=1, i",
|
|
12837
|
+
origin: "https://creator.douyin.com",
|
|
12838
|
+
referer: "https://creator.douyin.com/",
|
|
12839
|
+
"sec-ch-ua": params.extraParam?.browserInfo?.["sec-ch-ua"] || "",
|
|
12840
|
+
"sec-ch-ua-mobile": "?0",
|
|
12841
|
+
"sec-ch-ua-platform": params.extraParam?.browserInfo?.["sec-ch-ua-platform"] || "",
|
|
12842
|
+
"sec-fetch-dest": "empty",
|
|
12843
|
+
"sec-fetch-mode": "cors",
|
|
12844
|
+
"sec-fetch-site": "cross-site",
|
|
12845
|
+
"user-agent": userAgent,
|
|
12825
12846
|
"agw-auth": authorization?.signature || "",
|
|
12826
|
-
"
|
|
12827
|
-
}
|
|
12847
|
+
"openapi-omit-shark": "1"
|
|
12848
|
+
},
|
|
12849
|
+
responseType: "arraybuffer"
|
|
12828
12850
|
}, {
|
|
12829
12851
|
retries: 3,
|
|
12830
12852
|
retryDelay: 20,
|
|
12831
12853
|
timeout: 3000
|
|
12832
12854
|
});
|
|
12833
|
-
|
|
12855
|
+
const decompressed = (0, __WEBPACK_EXTERNAL_MODULE_fzstd__.decompress)(new Uint8Array(musicRes));
|
|
12856
|
+
const res = JSON.parse(Buffer.from(decompressed).toString("utf-8"));
|
|
12857
|
+
console.log("抖音获取音乐响应:", JSON.stringify(res));
|
|
12834
12858
|
const isSuccess = 0 === res.status_code;
|
|
12835
12859
|
const message = `抖音获取音乐${isSuccess ? "成功" : `失败,原因:${res.status_msg}`}${_task.debug ? ` ${http.proxyInfo}` : ""}`;
|
|
12836
12860
|
const data = isSuccess ? {
|