yz-yuki-plugin 2.0.5-3 → 2.0.5-5
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/CHANGELOG.md +1 -0
- package/README.md +1 -1
- package/lib/models/bilibili/bilibili.task.js +18 -16
- package/lib/models/weibo/weibo.task.js +7 -5
- package/package.json +11 -9
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -72,29 +72,31 @@ class BiliTask {
|
|
|
72
72
|
// 检查是否已经请求过该 uid
|
|
73
73
|
if (requestedDataOfUids.has(subInfoOfup.uid)) {
|
|
74
74
|
resp = requestedDataOfUids.get(subInfoOfup.uid); // 从已请求的映射中获取响应数据
|
|
75
|
+
const dynamicData = resp.data?.items || [];
|
|
76
|
+
dynamicList[subInfoOfup.uid] = dynamicData;
|
|
75
77
|
}
|
|
76
78
|
else {
|
|
77
79
|
resp = await this.hendleEventDynamicData(subInfoOfup.uid);
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
80
|
+
if (resp) {
|
|
81
|
+
if (resp.code === 0) {
|
|
82
|
+
requestedDataOfUids.set(subInfoOfup.uid, resp); // 将响应数据存储到映射中
|
|
83
|
+
const dynamicData = resp.data?.items || [];
|
|
84
|
+
dynamicList[subInfoOfup.uid] = dynamicData;
|
|
85
|
+
}
|
|
86
|
+
else if (resp.code === -352) {
|
|
87
|
+
logger.error(`获取 ${subInfoOfup.uid} 动态失败,resCode:-352`);
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
else if (resp.code !== 0) {
|
|
91
|
+
logger.error(`获取 ${subInfoOfup.uid} 动态失败,resCode:${resp.code}`);
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
88
94
|
}
|
|
89
|
-
else
|
|
90
|
-
logger.error(`获取 ${subInfoOfup.uid}
|
|
95
|
+
else {
|
|
96
|
+
logger.error(`获取 ${subInfoOfup.uid} 动态失败,无响应数据,本次任务终止,待下次任务自动重试`);
|
|
91
97
|
return;
|
|
92
98
|
}
|
|
93
99
|
}
|
|
94
|
-
else {
|
|
95
|
-
logger.error(`获取 ${subInfoOfup.uid} 动态失败,resp 为空`);
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
100
|
const chatIds = Array.from(new Set([...Object((chatTypeMap.get(subInfoOfup.uid) && chatTypeMap.get(subInfoOfup.uid).chatIds) || []), chatId]));
|
|
99
101
|
const bot_id = subInfoOfup.bot_id || [];
|
|
100
102
|
const { name, type } = subInfoOfup;
|
|
@@ -46,14 +46,16 @@ class WeiboTask {
|
|
|
46
46
|
// 检查是否已经请求过该 uid
|
|
47
47
|
if (requestedDataOfUids.has(subInfoOfup.uid)) {
|
|
48
48
|
resp = requestedDataOfUids.get(subInfoOfup.uid); // 从已请求的映射中获取响应数据
|
|
49
|
+
const dynamicData = resp || [];
|
|
50
|
+
dynamicList[subInfoOfup.uid] = dynamicData;
|
|
49
51
|
}
|
|
50
52
|
else {
|
|
51
53
|
resp = await await new WeiboGetWebData().getBloggerDynamicList(subInfoOfup.uid); // 获取指定 uid 的动态列表
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
if (resp) {
|
|
55
|
+
requestedDataOfUids.set(subInfoOfup.uid, resp); // 将响应数据存储到映射中
|
|
56
|
+
const dynamicData = resp || [];
|
|
57
|
+
dynamicList[subInfoOfup.uid] = dynamicData;
|
|
58
|
+
}
|
|
57
59
|
}
|
|
58
60
|
const chatIds = Array.from(new Set([...Object((chatTypeMap.get(subInfoOfup.uid) && chatTypeMap.get(subInfoOfup.uid).chatIds) || []), chatId]));
|
|
59
61
|
const bot_id = subInfoOfup.bot_id || [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yz-yuki-plugin",
|
|
3
|
-
"version": "2.0.5-
|
|
3
|
+
"version": "2.0.5-5",
|
|
4
4
|
"description": "优纪插件,yunzaijs 关于 微博推送、B站推送 等功能的拓展插件",
|
|
5
5
|
"author": "snowtafir",
|
|
6
6
|
"type": "module",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"chokidar": "^3.6.0",
|
|
31
31
|
"debug": "^4.3.6",
|
|
32
32
|
"jsdom": "^24.1.1",
|
|
33
|
-
"jsxp": "^1.0.4",
|
|
34
33
|
"json5": "^2.2.3",
|
|
34
|
+
"jsxp": "^1.0.4",
|
|
35
35
|
"lodash": "^4.17.21",
|
|
36
36
|
"md5": "^2.3.0",
|
|
37
37
|
"moment": "^2.30.1",
|
|
38
38
|
"node-fetch": "^3.3.2",
|
|
39
|
-
"puppeteer": "^23.
|
|
39
|
+
"puppeteer": "^23.6.0",
|
|
40
40
|
"qrcode": "^1.5.4",
|
|
41
41
|
"react": "^18.3.1",
|
|
42
42
|
"react-dom": "^18.3.1",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/chalk": "2.2.0",
|
|
49
|
-
"@types/lodash": "^4.17.7",
|
|
50
49
|
"@types/jsdom": "^21.1.7",
|
|
50
|
+
"@types/lodash": "^4.17.7",
|
|
51
51
|
"@types/md5": "^2.3.5",
|
|
52
52
|
"@types/node": "^22.2.0",
|
|
53
53
|
"@types/node-fetch": "^2.6.11",
|
|
@@ -55,27 +55,29 @@
|
|
|
55
55
|
"@types/react": "^18.3.3",
|
|
56
56
|
"@types/react-dom": "^18.3.0",
|
|
57
57
|
"@types/yaml": "1.9.7",
|
|
58
|
+
"autoprefixer": "^10.4.20",
|
|
58
59
|
"axios": "^1.7.7",
|
|
59
60
|
"chokidar": "^3.6.0",
|
|
60
61
|
"husky": "^9.1.6",
|
|
61
62
|
"jsdom": "^24.1.1",
|
|
62
|
-
"jsxp": "^1.0.4",
|
|
63
63
|
"json5": "^2.2.3",
|
|
64
|
+
"jsxp": "^1.0.4",
|
|
64
65
|
"lodash": "^4.17.21",
|
|
65
|
-
"lvyjs": "^0.0
|
|
66
|
+
"lvyjs": "^0.1.0",
|
|
66
67
|
"md5": "^2.3.0",
|
|
67
68
|
"node-fetch": "^3.3.2",
|
|
69
|
+
"postcss": "^8.4.47",
|
|
68
70
|
"prettier": "^3.3.3",
|
|
69
|
-
"puppeteer": "^23.
|
|
71
|
+
"puppeteer": "^23.6.0",
|
|
70
72
|
"qrcode": "^1.5.4",
|
|
71
73
|
"react": "^18.3.1",
|
|
72
74
|
"react-dom": "^18.3.1",
|
|
73
75
|
"redis": "^4.7.0",
|
|
74
|
-
"tailwindcss": "^3.4.
|
|
76
|
+
"tailwindcss": "^3.4.14",
|
|
75
77
|
"ts-node": "^10.9.2",
|
|
76
78
|
"tsx": "^4.19.0",
|
|
77
79
|
"typescript": "^5.5.4",
|
|
78
|
-
"yunzaijs": "^1.0.0-rc.
|
|
80
|
+
"yunzaijs": "^1.0.0-rc.5"
|
|
79
81
|
},
|
|
80
82
|
"files": [
|
|
81
83
|
"public",
|