@iflyrpa/actions 3.0.3 → 3.0.5-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 +53 -22
- package/dist/bundle.js.map +1 -1
- package/dist/index.js +53 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +53 -22
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
|
@@ -8736,9 +8736,7 @@ var __webpack_exports__ = {};
|
|
|
8736
8736
|
var package_namespaceObject = {
|
|
8737
8737
|
i8: "0.1.0"
|
|
8738
8738
|
};
|
|
8739
|
-
var package_namespaceObject_0 = {
|
|
8740
|
-
i8: "3.0.2"
|
|
8741
|
-
};
|
|
8739
|
+
var package_namespaceObject_0 = JSON.parse('{"i8":"3.0.5-beta.1"}');
|
|
8742
8740
|
const external_node_fs_namespaceObject = require("node:fs");
|
|
8743
8741
|
var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
|
|
8744
8742
|
const external_node_http_namespaceObject = require("node:http");
|
|
@@ -23280,7 +23278,7 @@ var __webpack_exports__ = {};
|
|
|
23280
23278
|
};
|
|
23281
23279
|
const ProxyInfo = await http.api({
|
|
23282
23280
|
method: "POST",
|
|
23283
|
-
url: "
|
|
23281
|
+
url: "https://fetdev.iflysec.com/ip-pool/pool/eip/proxy",
|
|
23284
23282
|
data: params
|
|
23285
23283
|
}).catch((err)=>{
|
|
23286
23284
|
throw {
|
|
@@ -23355,6 +23353,13 @@ var __webpack_exports__ = {};
|
|
|
23355
23353
|
}
|
|
23356
23354
|
};
|
|
23357
23355
|
if (foundError) Object.assign(errorResponse, foundError);
|
|
23356
|
+
if (error.response?.status === 403) {
|
|
23357
|
+
this.logger?.warn(`[403 详细信息] URL: ${error.config?.url}`);
|
|
23358
|
+
this.logger?.warn(`[403 响应头] ${JSON.stringify(error.response?.headers || {})}`);
|
|
23359
|
+
this.logger?.warn(`[403 响应体] ${JSON.stringify(error.response?.data || null)}`);
|
|
23360
|
+
const verifyDecision = error.response?.headers?.["x-tt-verify-passport-decision"];
|
|
23361
|
+
if (verifyDecision) this.logger?.warn(`[403 验证决策] x-tt-verify-passport-decision: ${verifyDecision}`);
|
|
23362
|
+
}
|
|
23358
23363
|
if (error.response?.data) {
|
|
23359
23364
|
if ("object" == typeof error.response.data) {
|
|
23360
23365
|
const serverError = error.response.data;
|
|
@@ -34796,6 +34801,32 @@ var __webpack_exports__ = {};
|
|
|
34796
34801
|
retries: 3,
|
|
34797
34802
|
retryDelay: 2000
|
|
34798
34803
|
});
|
|
34804
|
+
task.logger.info("========== api调用完成 ==========");
|
|
34805
|
+
task.logger.info(`decision值: ${JSON.stringify(decision)}, needsVerification(decision): ${needsVerification(decision)}`);
|
|
34806
|
+
if (needsVerification(decision)) {
|
|
34807
|
+
const details = [
|
|
34808
|
+
publishResult.status_msg,
|
|
34809
|
+
decision?.verify_title,
|
|
34810
|
+
decision?.verify_desc
|
|
34811
|
+
].filter(Boolean).join(" ");
|
|
34812
|
+
const message = `图文发布失败,原因:${details}${task.debug ? ` ${http.proxyInfo}` : ""}`;
|
|
34813
|
+
task.logger.warn(`TaskId:${task.taskId},检测到需要验证,准备返回验证信息`);
|
|
34814
|
+
const mockData = {
|
|
34815
|
+
state: types_TaskState.FAILED,
|
|
34816
|
+
error: message,
|
|
34817
|
+
result: {
|
|
34818
|
+
data: decision,
|
|
34819
|
+
uploadedImgList: JSON.stringify(publishData.item.common.images)
|
|
34820
|
+
}
|
|
34821
|
+
};
|
|
34822
|
+
await updateTaskState?.(mockData);
|
|
34823
|
+
return {
|
|
34824
|
+
code: 0,
|
|
34825
|
+
data: mockData,
|
|
34826
|
+
message: "操作成功"
|
|
34827
|
+
};
|
|
34828
|
+
}
|
|
34829
|
+
task.logger.info("不需要验证,继续正常流程");
|
|
34799
34830
|
reportLogger({
|
|
34800
34831
|
token: params.huiwenToken || "",
|
|
34801
34832
|
enverionment: task.enverionment || "development",
|
|
@@ -36314,26 +36345,26 @@ var __webpack_exports__ = {};
|
|
|
36314
36345
|
const http = new Http({
|
|
36315
36346
|
headers: {
|
|
36316
36347
|
cookie: params.cookies.map((it)=>`${it.name}=${it.value}`).join(";"),
|
|
36317
|
-
referer: "https://mp.toutiao.com/profile_v4/graphic/publish"
|
|
36348
|
+
referer: "https://mp.toutiao.com/profile_v4/graphic/publish",
|
|
36349
|
+
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
|
|
36350
|
+
}
|
|
36351
|
+
});
|
|
36352
|
+
const totalData = await http.api({
|
|
36353
|
+
method: "get",
|
|
36354
|
+
url: "https://mp.toutiao.com/mp/fe_api/home/merge_v2",
|
|
36355
|
+
params: {
|
|
36356
|
+
app_id: 1231
|
|
36357
|
+
}
|
|
36358
|
+
});
|
|
36359
|
+
await new Promise((r)=>setTimeout(r, 1000));
|
|
36360
|
+
const contentDataYesterday = await http.api({
|
|
36361
|
+
method: "get",
|
|
36362
|
+
url: "https://mp.toutiao.com/mp/agw/statistic/v2/content_stat",
|
|
36363
|
+
params: {
|
|
36364
|
+
type: 0,
|
|
36365
|
+
app_id: 1231
|
|
36318
36366
|
}
|
|
36319
36367
|
});
|
|
36320
|
-
const [totalData, contentDataYesterday] = await Promise.all([
|
|
36321
|
-
http.api({
|
|
36322
|
-
method: "get",
|
|
36323
|
-
url: "https://mp.toutiao.com/mp/fe_api/home/merge_v2",
|
|
36324
|
-
params: {
|
|
36325
|
-
app_id: 1231
|
|
36326
|
-
}
|
|
36327
|
-
}),
|
|
36328
|
-
http.api({
|
|
36329
|
-
method: "get",
|
|
36330
|
-
url: "https://mp.toutiao.com/mp/agw/statistic/v2/content_stat",
|
|
36331
|
-
params: {
|
|
36332
|
-
type: 0,
|
|
36333
|
-
app_id: 1231
|
|
36334
|
-
}
|
|
36335
|
-
})
|
|
36336
|
-
]);
|
|
36337
36368
|
const isSuccess = !!(totalData?.data?.statistic && contentDataYesterday?.author_stat);
|
|
36338
36369
|
if (!isSuccess || !totalData?.data || !contentDataYesterday?.author_stat) return types_errorResponse(totalData?.message || contentDataYesterday?.message || "头条号数据获取失败,请检查Cookie是否有效", 414);
|
|
36339
36370
|
const ttData = {
|