@iflyrpa/actions 4.0.4-beta.4 → 4.0.4-beta.6
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/actions/searchPublishInfo/types.d.ts +3 -0
- package/dist/bundle.js +63 -13
- package/dist/bundle.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +63 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +63 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -174,6 +174,7 @@ export declare class Action {
|
|
|
174
174
|
postType: string;
|
|
175
175
|
postStatus: number;
|
|
176
176
|
originalData?: unknown;
|
|
177
|
+
effectiveTime?: number | undefined;
|
|
177
178
|
})[] | undefined;
|
|
178
179
|
timerPublish?: ({
|
|
179
180
|
title: string;
|
|
@@ -248,6 +249,7 @@ export declare class Action {
|
|
|
248
249
|
postType: string;
|
|
249
250
|
postStatus: number;
|
|
250
251
|
originalData?: unknown;
|
|
252
|
+
effectiveTime?: number | undefined;
|
|
251
253
|
})[] | undefined;
|
|
252
254
|
pagination?: {
|
|
253
255
|
pageNum: number;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c84bf1c2-549b-54ff-9b48-f44dd094326b")}catch(e){}}();
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
4
|
"./src/utils/XhsXsCommonEnc.js": function(module) {
|
|
5
5
|
var encrypt_lookup = [
|
|
@@ -4402,7 +4402,7 @@ var __webpack_exports__ = {};
|
|
|
4402
4402
|
});
|
|
4403
4403
|
const package_json_namespaceObject = require("@iflyrpa/share/package.json");
|
|
4404
4404
|
var package_json_default = /*#__PURE__*/ __webpack_require__.n(package_json_namespaceObject);
|
|
4405
|
-
var package_namespaceObject = JSON.parse('{"i8":"4.0.4-beta.
|
|
4405
|
+
var package_namespaceObject = JSON.parse('{"i8":"4.0.4-beta.6"}');
|
|
4406
4406
|
const share_namespaceObject = require("@iflyrpa/share");
|
|
4407
4407
|
const external_node_fs_namespaceObject = require("node:fs");
|
|
4408
4408
|
var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
|
|
@@ -15456,8 +15456,6 @@ var __webpack_exports__ = {};
|
|
|
15456
15456
|
userProfileP,
|
|
15457
15457
|
overviewP
|
|
15458
15458
|
]);
|
|
15459
|
-
_task.logger.info(`抖音用户信息响应: ${JSON.stringify(userProfile)}`);
|
|
15460
|
-
_task.logger.info(`抖音近7日数据响应: ${JSON.stringify(overview)}`);
|
|
15461
15459
|
let fansNum = 0;
|
|
15462
15460
|
let favedNum = 0;
|
|
15463
15461
|
let followingNum = 0;
|
|
@@ -15541,7 +15539,6 @@ var __webpack_exports__ = {};
|
|
|
15541
15539
|
retryDelay: 100,
|
|
15542
15540
|
timeout: 5000
|
|
15543
15541
|
});
|
|
15544
|
-
_task.logger.info(`视频号账号数据响应: ${JSON.stringify(authData)}`);
|
|
15545
15542
|
const AUTH_ERROR_CODES = [
|
|
15546
15543
|
300333,
|
|
15547
15544
|
300334,
|
|
@@ -15558,13 +15555,60 @@ var __webpack_exports__ = {};
|
|
|
15558
15555
|
return types_errorResponse(`视频号账号信息获取失败:${authData.errMsg || "未知错误"}`, 414);
|
|
15559
15556
|
}
|
|
15560
15557
|
const finderUser = authData.data?.finderUser;
|
|
15558
|
+
const now = new Date();
|
|
15559
|
+
const yesterday = new Date(now.getFullYear(), now.getMonth(), now.getDate() - 2);
|
|
15560
|
+
const startTs = Math.floor(yesterday.getTime() / 1000);
|
|
15561
|
+
const endTs = startTs + 86400;
|
|
15562
|
+
_task.logger.info(`视频号昨日数据范围 start: ${startTs} ~ end: ${endTs}`);
|
|
15563
|
+
let fansNumYesterday = 0;
|
|
15564
|
+
let playNumYesterday = 0;
|
|
15565
|
+
let likeNumYesterday = 0;
|
|
15566
|
+
let commentNumYesterday = 0;
|
|
15567
|
+
try {
|
|
15568
|
+
const statsData = await http.api({
|
|
15569
|
+
method: "post",
|
|
15570
|
+
url: "https://channels.weixin.qq.com/cgi-bin/mmfinderassistant-bin/statistic/new_post_total_data",
|
|
15571
|
+
params: {
|
|
15572
|
+
_aid: aid,
|
|
15573
|
+
_rid: `${Date.now().toString(16)}-${Math.random().toString(36).substring(2, 9)}`,
|
|
15574
|
+
_pageUrl: encodeURIComponent("https://channels.weixin.qq.com/platform")
|
|
15575
|
+
},
|
|
15576
|
+
data: {
|
|
15577
|
+
startTs: startTs.toString(),
|
|
15578
|
+
endTs: endTs.toString(),
|
|
15579
|
+
interval: 3,
|
|
15580
|
+
timestamp: Date.now().toString(),
|
|
15581
|
+
_log_finder_uin: "",
|
|
15582
|
+
_log_finder_id: finderId,
|
|
15583
|
+
rawKeyBuff: "",
|
|
15584
|
+
pluginSessionId: null,
|
|
15585
|
+
scene: 7,
|
|
15586
|
+
reqScene: 7
|
|
15587
|
+
}
|
|
15588
|
+
}, {
|
|
15589
|
+
retries: 3,
|
|
15590
|
+
retryDelay: 100,
|
|
15591
|
+
timeout: 5000
|
|
15592
|
+
});
|
|
15593
|
+
if (!statsData.errCode && statsData.data?.totalData) {
|
|
15594
|
+
const data = statsData.data.totalData;
|
|
15595
|
+
fansNumYesterday = Number.parseInt(data.follow?.[1] || "0", 10) || 0;
|
|
15596
|
+
playNumYesterday = Number.parseInt(data.browse?.[1] || "0", 10) || 0;
|
|
15597
|
+
likeNumYesterday = Number.parseInt(data.like?.[1] || "0", 10) || 0;
|
|
15598
|
+
commentNumYesterday = Number.parseInt(data.comment?.[1] || "0", 10) || 0;
|
|
15599
|
+
_task.logger.info(`视频号昨日数据提取成功 - 净增关注:${fansNumYesterday}, 播放:${playNumYesterday}, 喜欢:${likeNumYesterday}, 评论:${commentNumYesterday}`);
|
|
15600
|
+
}
|
|
15601
|
+
} catch (error) {
|
|
15602
|
+
const errMsg = error instanceof Error ? error.message : String(error);
|
|
15603
|
+
_task.logger.warn(`视频号昨日数据获取失败(降级为null): ${errMsg}`);
|
|
15604
|
+
}
|
|
15561
15605
|
const shipinhaoData = {
|
|
15562
15606
|
fansNum: finderUser?.fansCount || 0,
|
|
15563
15607
|
feedsCount: finderUser?.feedsCount || 0,
|
|
15564
|
-
fansNumYesterday
|
|
15565
|
-
playNumYesterday
|
|
15566
|
-
likeNumYesterday
|
|
15567
|
-
commentNumYesterday
|
|
15608
|
+
fansNumYesterday,
|
|
15609
|
+
playNumYesterday,
|
|
15610
|
+
likeNumYesterday,
|
|
15611
|
+
commentNumYesterday
|
|
15568
15612
|
};
|
|
15569
15613
|
return (0, share_namespaceObject.success)(shipinhaoData, "视频号平台数据获取成功!");
|
|
15570
15614
|
} catch (error) {
|
|
@@ -15887,7 +15931,8 @@ var __webpack_exports__ = {};
|
|
|
15887
15931
|
favNum: schemas_number(),
|
|
15888
15932
|
objectId: schemas_string(),
|
|
15889
15933
|
postType: schemas_string(),
|
|
15890
|
-
postStatus: schemas_number()
|
|
15934
|
+
postStatus: schemas_number(),
|
|
15935
|
+
effectiveTime: schemas_number().optional()
|
|
15891
15936
|
});
|
|
15892
15937
|
const FetchArticlesDataSchema = schemas_object({
|
|
15893
15938
|
articleCell: schemas_array(union([
|
|
@@ -16021,7 +16066,8 @@ var __webpack_exports__ = {};
|
|
|
16021
16066
|
}
|
|
16022
16067
|
async function handleDouyinData(_task, params) {
|
|
16023
16068
|
try {
|
|
16024
|
-
const { cookies,
|
|
16069
|
+
const { cookies, pageSize = 12, status = 0, showOriginalData = false, onlySuccess = false } = params;
|
|
16070
|
+
const pageNum = params.pageNum || 1;
|
|
16025
16071
|
const headers = {
|
|
16026
16072
|
cookie: cookies.map((it)=>`${it.name}=${it.value}`).join(";"),
|
|
16027
16073
|
referer: "https://creator.douyin.com"
|
|
@@ -16116,7 +16162,8 @@ var __webpack_exports__ = {};
|
|
|
16116
16162
|
}
|
|
16117
16163
|
async function handleShipinhaoData(_task, params) {
|
|
16118
16164
|
try {
|
|
16119
|
-
const { cookies, postType = "all",
|
|
16165
|
+
const { cookies, postType = "all", pageSize = 10, showOriginalData = false } = params;
|
|
16166
|
+
const pageNum = params.pageNum || 1;
|
|
16120
16167
|
const aidCookie = cookies.find((it)=>"_aid" === it.name)?.value;
|
|
16121
16168
|
const aid = aidCookie || "9d3e0e9f-b842-498d-a273-4285d58df264";
|
|
16122
16169
|
const uinCookie = cookies.find((it)=>"uin" === it.name || "wxuin" === it.name)?.value || "0000000000";
|
|
@@ -16221,6 +16268,9 @@ var __webpack_exports__ = {};
|
|
|
16221
16268
|
objectId: item.exportId || item.objectId || "",
|
|
16222
16269
|
postType: forcePostType,
|
|
16223
16270
|
postStatus: item.status || item.post_status || 0,
|
|
16271
|
+
...item.effectiveTime ? {
|
|
16272
|
+
effectiveTime: item.effectiveTime
|
|
16273
|
+
} : {},
|
|
16224
16274
|
...showOriginalData ? {
|
|
16225
16275
|
originalData: item
|
|
16226
16276
|
} : {}
|
|
@@ -25630,4 +25680,4 @@ if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_targe
|
|
|
25630
25680
|
});
|
|
25631
25681
|
|
|
25632
25682
|
//# sourceMappingURL=index.js.map
|
|
25633
|
-
//# debugId=
|
|
25683
|
+
//# debugId=c84bf1c2-549b-54ff-9b48-f44dd094326b
|