@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/index.js CHANGED
@@ -5489,7 +5489,7 @@ var __webpack_exports__ = {};
5489
5489
  });
5490
5490
  const package_json_namespaceObject = require("@iflyrpa/share/package.json");
5491
5491
  var package_json_default = /*#__PURE__*/ __webpack_require__.n(package_json_namespaceObject);
5492
- var package_namespaceObject = JSON.parse('{"i8":"3.0.0-beta.1"}');
5492
+ var package_namespaceObject = JSON.parse('{"i8":"3.0.0-beta.2"}');
5493
5493
  const share_namespaceObject = require("@iflyrpa/share");
5494
5494
  const external_node_fs_namespaceObject = require("node:fs");
5495
5495
  var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
@@ -5522,7 +5522,11 @@ var __webpack_exports__ = {};
5522
5522
  url: "http://172.29.194.32:9998/pool/eip/proxy",
5523
5523
  data: params
5524
5524
  }).catch((err)=>{
5525
- throw new Error(`请求代理失败:${err.message}`);
5525
+ throw {
5526
+ code: 414,
5527
+ message: `请求代理失败:${err.message}`,
5528
+ data: {}
5529
+ };
5526
5530
  });
5527
5531
  const loggerInfo = {
5528
5532
  params,
@@ -12793,6 +12797,7 @@ var __webpack_exports__ = {};
12793
12797
  };
12794
12798
  return (0, share_namespaceObject.response)(isSuccess ? 0 : 414, message, data);
12795
12799
  };
12800
+ const external_fzstd_namespaceObject = require("fzstd");
12796
12801
  const DouyinGetMusicParamsSchema = ActionCommonParamsSchema.extend({
12797
12802
  keyword: schemas_string().optional(),
12798
12803
  count: schemas_number().optional()
@@ -12874,8 +12879,11 @@ var __webpack_exports__ = {};
12874
12879
  browser_version: userAgent,
12875
12880
  browser_online: "true",
12876
12881
  timezone_name: "Asia/Shanghai",
12877
- support_h265: "1"
12882
+ support_h265: "1",
12883
+ a_bogus: ""
12878
12884
  };
12885
+ const authQueryBefore = new URLSearchParams(authorizationParams).toString();
12886
+ authorizationParams.a_bogus = douyinGetMusic_getABogus(`https://creator.douyin.com/web/api/media/aweme/search/post/auth/?${authQueryBefore}`, {}, userAgent);
12879
12887
  const authorizationQueryString = new URLSearchParams(authorizationParams).toString();
12880
12888
  const authorization = await http.api({
12881
12889
  method: "get",
@@ -12894,20 +12902,36 @@ var __webpack_exports__ = {};
12894
12902
  total: 0
12895
12903
  });
12896
12904
  console.log("抖音获取音乐权限:", authorization);
12897
- const res = await http.api({
12905
+ const musicRes = await http.api({
12898
12906
  method: "get",
12899
12907
  url: `https://tsearch.amemv.com/openapi/aweme/v1/music/search/?${queryString}`,
12900
12908
  headers: {
12901
- ...headers,
12909
+ Accept: "application/json, text/plain, */*",
12910
+ "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7",
12911
+ "cache-control": "no-cache",
12912
+ pragma: "no-cache",
12913
+ priority: "u=1, i",
12914
+ origin: "https://creator.douyin.com",
12915
+ referer: "https://creator.douyin.com/",
12916
+ "sec-ch-ua": params.extraParam?.browserInfo?.["sec-ch-ua"] || "",
12917
+ "sec-ch-ua-mobile": "?0",
12918
+ "sec-ch-ua-platform": params.extraParam?.browserInfo?.["sec-ch-ua-platform"] || "",
12919
+ "sec-fetch-dest": "empty",
12920
+ "sec-fetch-mode": "cors",
12921
+ "sec-fetch-site": "cross-site",
12922
+ "user-agent": userAgent,
12902
12923
  "agw-auth": authorization?.signature || "",
12903
- "X-secsdk-csrf-token": csrfToken
12904
- }
12924
+ "openapi-omit-shark": "1"
12925
+ },
12926
+ responseType: "arraybuffer"
12905
12927
  }, {
12906
12928
  retries: 3,
12907
12929
  retryDelay: 20,
12908
12930
  timeout: 3000
12909
12931
  });
12910
- console.log("抖音获取音乐响应:", res);
12932
+ const decompressed = (0, external_fzstd_namespaceObject.decompress)(new Uint8Array(musicRes));
12933
+ const res = JSON.parse(Buffer.from(decompressed).toString("utf-8"));
12934
+ console.log("抖音获取音乐响应:", JSON.stringify(res));
12911
12935
  const isSuccess = 0 === res.status_code;
12912
12936
  const message = `抖音获取音乐${isSuccess ? "成功" : `失败,原因:${res.status_msg}`}${_task.debug ? ` ${http.proxyInfo}` : ""}`;
12913
12937
  const data = isSuccess ? {