@iflyrpa/actions 1.2.3 → 1.2.5-beta.0
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 +13 -5
- package/dist/bundle.js.map +1 -1
- package/dist/index.js +13 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -1
package/dist/index.mjs
CHANGED
|
@@ -233,7 +233,8 @@ const errnoMap = {
|
|
|
233
233
|
20040033: "封面图片推荐 jpg、png格式,宽高在372×284-5000×5000 范围内。",
|
|
234
234
|
2004005714: "网络环境异常,请检查网络后重试发布。",
|
|
235
235
|
401100032: "异常,请检查图片(如:格式、版权、合规性等)。",
|
|
236
|
-
20040034: "封面图片推荐jpg、png格式,不支持gif格式。"
|
|
236
|
+
20040034: "封面图片推荐jpg、png格式,不支持gif格式。",
|
|
237
|
+
20040124: "服务器异常,请稍后重试!"
|
|
237
238
|
};
|
|
238
239
|
const mockAction = async (task, params)=>{
|
|
239
240
|
const { baijiahaoSingleCover, baijiahaoMultCover, baijiahaoCoverType } = params.settingInfo;
|
|
@@ -2031,7 +2032,9 @@ class XsEncrypt {
|
|
|
2031
2032
|
this.iv = __WEBPACK_EXTERNAL_MODULE_node_buffer_fb286294__.Buffer.from("4uzjr7mbsibcaldp", "utf8");
|
|
2032
2033
|
}
|
|
2033
2034
|
}
|
|
2034
|
-
const xiaohongshuPublish_mock_errnoMap = {
|
|
2035
|
+
const xiaohongshuPublish_mock_errnoMap = {
|
|
2036
|
+
903: "账户已登出,需重新登陆重试!"
|
|
2037
|
+
};
|
|
2035
2038
|
const xsEncrypt = new XsEncrypt();
|
|
2036
2039
|
const xiaohongshuPublish_mock_mockAction = async (task, params)=>{
|
|
2037
2040
|
const tmpCachePath = task.getTmpPath();
|
|
@@ -2075,6 +2078,11 @@ const xiaohongshuPublish_mock_mockAction = async (task, params)=>{
|
|
|
2075
2078
|
});
|
|
2076
2079
|
const coverIds = coverIdInfo.data.uploadTempPermits[0].fileIds;
|
|
2077
2080
|
const ossToken = coverIdInfo.data.uploadTempPermits[0].token;
|
|
2081
|
+
if (!coverIds || !ossToken) return {
|
|
2082
|
+
code: 200,
|
|
2083
|
+
message: "图片上传失败,请稍后重试!",
|
|
2084
|
+
data: ""
|
|
2085
|
+
};
|
|
2078
2086
|
const uploadFile = async (url, index)=>{
|
|
2079
2087
|
const fileName = (0, __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.getFilenameFromUrl)(url);
|
|
2080
2088
|
const localUrl = await (0, __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.downloadImage)(url, __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].join(tmpCachePath, fileName));
|
|
@@ -2193,7 +2201,7 @@ const xiaohongshuPublish_mock_mockAction = async (task, params)=>{
|
|
|
2193
2201
|
},
|
|
2194
2202
|
defaultErrorMsg: "文章发布异常,请稍后重试。"
|
|
2195
2203
|
});
|
|
2196
|
-
return (0, __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.success)(publishResult.data
|
|
2204
|
+
return (0, __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.success)(publishResult.data?.id);
|
|
2197
2205
|
};
|
|
2198
2206
|
const rpa_xsEncrypt = new XsEncrypt();
|
|
2199
2207
|
const xiaohongshuPublish_rpa_rpaAction = async (task, params)=>{
|
|
@@ -2299,7 +2307,7 @@ const xiaohongshuPublish_rpa_rpaAction = async (task, params)=>{
|
|
|
2299
2307
|
};
|
|
2300
2308
|
}
|
|
2301
2309
|
await page.locator("#content-area .menu-container .publish-video a").click();
|
|
2302
|
-
await page.locator(
|
|
2310
|
+
await page.locator('.creator-container .header .creator-tab:not([style*="-9999px"]) .title').filter({
|
|
2303
2311
|
hasText: /^上传图文$/
|
|
2304
2312
|
}).click();
|
|
2305
2313
|
const images = await Promise.all(params.banners.map((url)=>{
|
|
@@ -2402,7 +2410,7 @@ const xiaohongshuPublish = async (task, params)=>{
|
|
|
2402
2410
|
return executeAction(xiaohongshuPublish_mock_mockAction, xiaohongshuPublish_rpa_rpaAction)(task, params);
|
|
2403
2411
|
};
|
|
2404
2412
|
var package_namespaceObject = {
|
|
2405
|
-
i8: "1.2.
|
|
2413
|
+
i8: "1.2.4"
|
|
2406
2414
|
};
|
|
2407
2415
|
class Action {
|
|
2408
2416
|
constructor(task){
|