@iflyrpa/actions 3.0.4 → 4.0.0-beta.1
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 +44 -44
- package/dist/bundle.js.map +1 -1
- package/dist/index.js +44 -44
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +44 -44
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5434,9 +5434,7 @@ function __webpack_require__(moduleId) {
|
|
|
5434
5434
|
return module;
|
|
5435
5435
|
};
|
|
5436
5436
|
})();
|
|
5437
|
-
var package_namespaceObject = {
|
|
5438
|
-
i8: "3.0.3"
|
|
5439
|
-
};
|
|
5437
|
+
var package_namespaceObject = JSON.parse('{"i8":"3.0.5-beta.0"}');
|
|
5440
5438
|
var dist = __webpack_require__("../../node_modules/.pnpm/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/index.js");
|
|
5441
5439
|
async function ProxyAgent(task, ip, adr, accountId, refresh) {
|
|
5442
5440
|
const http = new Http({
|
|
@@ -5526,6 +5524,13 @@ class Http {
|
|
|
5526
5524
|
}
|
|
5527
5525
|
};
|
|
5528
5526
|
if (foundError) Object.assign(errorResponse, foundError);
|
|
5527
|
+
if (error.response?.status === 403) {
|
|
5528
|
+
this.logger?.warn(`[403 详细信息] URL: ${error.config?.url}`);
|
|
5529
|
+
this.logger?.warn(`[403 响应头] ${JSON.stringify(error.response?.headers || {})}`);
|
|
5530
|
+
this.logger?.warn(`[403 响应体] ${JSON.stringify(error.response?.data || null)}`);
|
|
5531
|
+
const verifyDecision = error.response?.headers?.["x-tt-verify-passport-decision"];
|
|
5532
|
+
if (verifyDecision) this.logger?.warn(`[403 验证决策] x-tt-verify-passport-decision: ${verifyDecision}`);
|
|
5533
|
+
}
|
|
5529
5534
|
if (error.response?.data) {
|
|
5530
5535
|
if ("object" == typeof error.response.data) {
|
|
5531
5536
|
const serverError = error.response.data;
|
|
@@ -14483,54 +14488,49 @@ const mock_mockAction = async (task, params)=>{
|
|
|
14483
14488
|
})}`);
|
|
14484
14489
|
task.logger.info(`publishData: ${JSON.stringify(publishData)}`);
|
|
14485
14490
|
task.logger.info(`url: https://creator.douyin.com/web/api/media/aweme/create_v2/?${publishQueryParams}`);
|
|
14486
|
-
|
|
14487
|
-
|
|
14488
|
-
|
|
14489
|
-
|
|
14490
|
-
|
|
14491
|
-
|
|
14492
|
-
|
|
14493
|
-
|
|
14494
|
-
|
|
14495
|
-
|
|
14496
|
-
|
|
14497
|
-
|
|
14498
|
-
|
|
14499
|
-
|
|
14500
|
-
|
|
14501
|
-
|
|
14502
|
-
|
|
14503
|
-
|
|
14504
|
-
|
|
14505
|
-
|
|
14506
|
-
|
|
14507
|
-
|
|
14508
|
-
|
|
14509
|
-
|
|
14510
|
-
|
|
14511
|
-
|
|
14512
|
-
|
|
14513
|
-
const upstreamCode = error?.code;
|
|
14514
|
-
task.logger.error(`TaskId:${task.taskId},create_v2 请求异常,上游错误已屏蔽。上游 code=${upstreamCode},message=${upstreamMessage}`, {
|
|
14515
|
-
error,
|
|
14516
|
-
upstreamData: error?.data,
|
|
14517
|
-
extra: error?.extra
|
|
14518
|
-
});
|
|
14519
|
-
const message = "发布失败,请重试";
|
|
14491
|
+
const publishResult = await proxyHttp.api({
|
|
14492
|
+
method: "post",
|
|
14493
|
+
url: `https://creator.douyin.com/web/api/media/aweme/create_v2/?${publishQueryParams}`,
|
|
14494
|
+
data: publishData,
|
|
14495
|
+
defaultErrorMsg: "发布异常,请稍后重试。",
|
|
14496
|
+
headers: {
|
|
14497
|
+
...headers,
|
|
14498
|
+
Referer: "https://creator.douyin.com/creator-micro/content/post/image?default-tab=3&enter_from=publish_page&media_type=image&type=new",
|
|
14499
|
+
"Content-Type": "application/json",
|
|
14500
|
+
Accept: "application/json, text/plain, */*",
|
|
14501
|
+
"bd-ticket-guard-client-data": bdTicketGuardClientData["headers_bd_ticket_guard_client_data"],
|
|
14502
|
+
"bd-ticket-guard-ree-public-key": bdTicketGuardClientData["headers_bd_ticket_guard_ree_public_key"],
|
|
14503
|
+
"bd-ticket-guard-version": "2",
|
|
14504
|
+
"bd-ticket-guard-web-sign-type": "1",
|
|
14505
|
+
"bd-ticket-guard-web-version": "2",
|
|
14506
|
+
"x-secsdk-csrf-token": csrfToken,
|
|
14507
|
+
"x-tt-session-dtrait": sessionDtrait || ""
|
|
14508
|
+
}
|
|
14509
|
+
}, {
|
|
14510
|
+
timeout: 60000,
|
|
14511
|
+
retries: 3,
|
|
14512
|
+
retryDelay: 2000
|
|
14513
|
+
});
|
|
14514
|
+
task.logger.info("========== api调用完成 ==========");
|
|
14515
|
+
task.logger.info(`decision值: ${JSON.stringify(decision)}, needsVerification(decision): ${needsVerification(decision)}`);
|
|
14516
|
+
if (needsVerification(decision)) {
|
|
14517
|
+
task.logger.warn(`TaskId:${task.taskId},检测到需要验证,准备返回验证信息`);
|
|
14520
14518
|
await updateTaskState?.({
|
|
14521
|
-
state: __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.TaskState.
|
|
14522
|
-
error: message,
|
|
14519
|
+
state: __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.TaskState.SUCCESS,
|
|
14523
14520
|
result: {
|
|
14524
|
-
|
|
14525
|
-
uploadedImgList: JSON.stringify(publishData.item.common.images)
|
|
14521
|
+
response: decision
|
|
14526
14522
|
}
|
|
14527
14523
|
});
|
|
14524
|
+
task.logger.info("返回验证响应: code=0, message=操作成功");
|
|
14528
14525
|
return {
|
|
14529
|
-
code:
|
|
14530
|
-
data:
|
|
14531
|
-
|
|
14526
|
+
code: 0,
|
|
14527
|
+
data: {
|
|
14528
|
+
result: decision
|
|
14529
|
+
},
|
|
14530
|
+
message: "操作成功"
|
|
14532
14531
|
};
|
|
14533
14532
|
}
|
|
14533
|
+
task.logger.info("不需要验证,继续正常流程");
|
|
14534
14534
|
reportLogger({
|
|
14535
14535
|
token: params.huiwenToken || "",
|
|
14536
14536
|
enverionment: task.enverionment || "development",
|