oc-browser-relay 1.0.23 → 1.0.26
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/bundled-relay/index.js +49 -57
- package/bundled-relay/public/configs/pages/alimama-account-report.json +65 -0
- package/bundled-relay/public/configs/pages/sycm-taobao-home.json +37 -0
- package/bundled-relay/public/configs/task-templates/alimama-adgroup-report-download.json +166 -0
- package/bundled-relay/public/configs/task-templates/index.json +1 -0
- package/bundled-relay/public/configs/task-templates/sycm-taobao-home-live-metrics.json +49 -129
- package/index.js +35 -34
- package/package.json +2 -1
- package/skills/oc-browser-relay-alimama/SKILL.md +18 -1
- package/skills/oc-browser-relay-article/SKILL.md +8 -5
- package/skills/oc-browser-relay-douyin/SKILL.md +4 -2
- package/skills/oc-browser-relay-sycm/SKILL.md +22 -13
- package/skills/oc-browser-relay-xiaohongshu/SKILL.md +4 -5
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"taskType": "browser_action",
|
|
4
4
|
"platform": "taobao",
|
|
5
5
|
"name": "采集生意参谋首页店铺数据",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "打开生意参谋首页,直接构造请求调用首页概览与趋势接口。",
|
|
7
7
|
"requiredFields": [],
|
|
8
8
|
"optionalFields": [
|
|
9
9
|
{
|
|
@@ -12,34 +12,21 @@
|
|
|
12
12
|
"description": "生意参谋首页地址,默认首页",
|
|
13
13
|
"default": "https://sycm.taobao.com/portal/home.htm"
|
|
14
14
|
},
|
|
15
|
-
{
|
|
16
|
-
"name": "metricPeriodLabel",
|
|
17
|
-
"type": "string",
|
|
18
|
-
"description": "首页时间粒度按钮文本,支持:昨天、实时、日、周、月",
|
|
19
|
-
"default": "昨天"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"name": "invokeDirectly",
|
|
23
|
-
"type": "boolean",
|
|
24
|
-
"description": "是否跳过页面点击,直接在页面会话内调用接口;06:00 前请求“昨天”时会强制走直调以回退到前天",
|
|
25
|
-
"default": false
|
|
26
|
-
},
|
|
27
15
|
{
|
|
28
16
|
"name": "requestDateType",
|
|
29
17
|
"type": "string",
|
|
30
|
-
"description": "
|
|
31
|
-
"default": "today"
|
|
18
|
+
"description": "时间类型:today(实时当日数据);不传则默认取昨天数据"
|
|
32
19
|
},
|
|
33
20
|
{
|
|
34
21
|
"name": "requestDateRange",
|
|
35
22
|
"type": "string",
|
|
36
|
-
"description": "
|
|
23
|
+
"description": "自定义日期范围,格式 YYYY-MM-DD|YYYY-MM-DD,不传时默认取昨天",
|
|
37
24
|
"default": ""
|
|
38
25
|
},
|
|
39
26
|
{
|
|
40
27
|
"name": "effectiveMetricPeriodLabel",
|
|
41
28
|
"type": "string",
|
|
42
|
-
"description": "
|
|
29
|
+
"description": "内部派生的实际生效周期标签"
|
|
43
30
|
},
|
|
44
31
|
{
|
|
45
32
|
"name": "effectiveDateRange",
|
|
@@ -50,6 +37,12 @@
|
|
|
50
37
|
"name": "returnHostPatterns",
|
|
51
38
|
"type": "array",
|
|
52
39
|
"description": "任务结束后若存在匹配这些 host 或 URL 片段的标签页,则切回该标签页"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"name": "device",
|
|
43
|
+
"type": "number",
|
|
44
|
+
"description": "设备维度参数,默认 0",
|
|
45
|
+
"default": 0
|
|
53
46
|
}
|
|
54
47
|
],
|
|
55
48
|
"nodes": [
|
|
@@ -69,72 +62,10 @@
|
|
|
69
62
|
"tool": "validate_page",
|
|
70
63
|
"args": {}
|
|
71
64
|
},
|
|
72
|
-
{
|
|
73
|
-
"nodeId": "s2b",
|
|
74
|
-
"name": "prepare_realtime_metrics",
|
|
75
|
-
"goal": "先切换到其他粒度,确保再切回目标粒度时会触发刷新",
|
|
76
|
-
"when": "equals(payload.invokeDirectly, false)",
|
|
77
|
-
"tool": "trigger_action",
|
|
78
|
-
"args": {
|
|
79
|
-
"action": "refresh_live_metrics",
|
|
80
|
-
"locators": [
|
|
81
|
-
{
|
|
82
|
-
"kind": "xpath",
|
|
83
|
-
"value": "//span[normalize-space(.)='数据概览']/ancestor::div[contains(@class,'pro-layout-card-header__content')][1]//div[contains(@class,'oui-date-picker-particle-button')]//button[.//span[translate(normalize-space(.), ' ', '')='日']]",
|
|
84
|
-
"priority": 1
|
|
85
|
-
}
|
|
86
|
-
]
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
65
|
{
|
|
90
66
|
"nodeId": "s3",
|
|
91
|
-
"name": "
|
|
92
|
-
"goal": "
|
|
93
|
-
"when": "equals(payload.invokeDirectly, false)",
|
|
94
|
-
"tool": "trigger_action",
|
|
95
|
-
"args": {
|
|
96
|
-
"action": "refresh_live_metrics",
|
|
97
|
-
"locators": [
|
|
98
|
-
{
|
|
99
|
-
"kind": "xpath",
|
|
100
|
-
"value": "//span[normalize-space(.)='数据概览']/ancestor::div[contains(@class,'pro-layout-card-header__content')][1]//div[contains(@class,'oui-date-picker-particle-button')]//button[.//span[translate(normalize-space(.), ' ', '')='{{data.metricPeriodLabel}}']]",
|
|
101
|
-
"priority": 1
|
|
102
|
-
}
|
|
103
|
-
],
|
|
104
|
-
"captureNetwork": {
|
|
105
|
-
"urlPattern": "https://sycm.taobao.com/portal/",
|
|
106
|
-
"method": "GET",
|
|
107
|
-
"timeoutMs": 15000,
|
|
108
|
-
"capability": "hybrid",
|
|
109
|
-
"operation": "capture_response",
|
|
110
|
-
"persistent": true,
|
|
111
|
-
"startPhase": "before_action",
|
|
112
|
-
"actionScope": "node",
|
|
113
|
-
"artifactType": "hybrid",
|
|
114
|
-
"includeBody": true,
|
|
115
|
-
"locationSuffix": "sycm_live_metrics",
|
|
116
|
-
"hint": "capture sycm home realtime metrics"
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
"nodeId": "s4",
|
|
122
|
-
"name": "collect_live_metrics",
|
|
123
|
-
"goal": "整合首页概览与趋势接口为统一结构化结果",
|
|
124
|
-
"when": "equals(payload.invokeDirectly, false)",
|
|
125
|
-
"tool": "collect_structured_data",
|
|
126
|
-
"args": {
|
|
127
|
-
"extractor": "live_metrics",
|
|
128
|
-
"sourceNodeId": "s3"
|
|
129
|
-
},
|
|
130
|
-
"storeAs": "liveMetrics",
|
|
131
|
-
"outputs": ["liveMetrics"]
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
"nodeId": "s3p",
|
|
135
|
-
"name": "show_live_metrics_direct_activity",
|
|
136
|
-
"goal": "在页面顶部展示独立提示,标记当前正在直调首页指标接口",
|
|
137
|
-
"when": "equals(payload.invokeDirectly, true)",
|
|
67
|
+
"name": "show_live_metrics_activity",
|
|
68
|
+
"goal": "在页面顶部展示独立提示,标记当前正在采集首页指标接口",
|
|
138
69
|
"tool": "present_page_activity",
|
|
139
70
|
"args": {
|
|
140
71
|
"mode": "start",
|
|
@@ -145,81 +76,70 @@
|
|
|
145
76
|
}
|
|
146
77
|
},
|
|
147
78
|
{
|
|
148
|
-
"nodeId": "
|
|
79
|
+
"nodeId": "s4",
|
|
149
80
|
"name": "invoke_live_metrics_overview",
|
|
150
|
-
"goal": "
|
|
151
|
-
"when": "equals(payload.
|
|
81
|
+
"goal": "在当前页面会话内直接调用实时概览接口",
|
|
82
|
+
"when": "equals(payload.requestDateType, 'today')",
|
|
152
83
|
"tool": "invoke_page_request",
|
|
153
84
|
"args": {
|
|
154
85
|
"sourceId": "live_metrics_overview",
|
|
155
86
|
"payload": {
|
|
156
|
-
"dateType": "{{data.requestDateType}}"
|
|
157
|
-
"dateRange": "{{data.requestDateRange}}"
|
|
158
|
-
},
|
|
159
|
-
"captureNetwork": {
|
|
160
|
-
"urlPattern": "https://sycm.taobao.com/portal/",
|
|
161
|
-
"method": "GET",
|
|
162
|
-
"timeoutMs": 15000,
|
|
163
|
-
"capability": "hybrid",
|
|
164
|
-
"operation": "capture_response",
|
|
165
|
-
"artifactType": "hybrid",
|
|
166
|
-
"includeBody": true,
|
|
167
|
-
"locationSuffix": "sycm_live_metrics_overview_request",
|
|
168
|
-
"hint": "invoke sycm overview request"
|
|
87
|
+
"dateType": "{{data.requestDateType}}"
|
|
169
88
|
}
|
|
170
89
|
}
|
|
171
90
|
},
|
|
172
91
|
{
|
|
173
|
-
"nodeId": "
|
|
92
|
+
"nodeId": "s5",
|
|
174
93
|
"name": "invoke_live_metrics_trend",
|
|
175
|
-
"goal": "
|
|
176
|
-
"when": "equals(payload.
|
|
94
|
+
"goal": "在当前页面会话内直接调用实时趋势接口",
|
|
95
|
+
"when": "equals(payload.requestDateType, 'today')",
|
|
177
96
|
"tool": "invoke_page_request",
|
|
178
97
|
"args": {
|
|
179
98
|
"sourceId": "live_metrics_trend",
|
|
180
99
|
"payload": {
|
|
181
|
-
"dateType": "{{data.requestDateType}}"
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
100
|
+
"dateType": "{{data.requestDateType}}"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"nodeId": "s4c",
|
|
106
|
+
"name": "invoke_live_metrics_custom_overview",
|
|
107
|
+
"goal": "在当前页面会话内直接调用自定义时间概览接口",
|
|
108
|
+
"when": "notEquals(payload.requestDateType, 'today')",
|
|
109
|
+
"tool": "invoke_page_request",
|
|
110
|
+
"args": {
|
|
111
|
+
"sourceId": "live_metrics_custom_overview",
|
|
112
|
+
"payload": {
|
|
113
|
+
"dateRange": "{{data.requestDateRange}}",
|
|
114
|
+
"device": "{{data.device}}"
|
|
194
115
|
}
|
|
195
116
|
}
|
|
196
117
|
},
|
|
197
118
|
{
|
|
198
|
-
"nodeId": "
|
|
199
|
-
"name": "
|
|
200
|
-
"goal": "
|
|
201
|
-
"when": "
|
|
202
|
-
"tool": "
|
|
119
|
+
"nodeId": "s5c",
|
|
120
|
+
"name": "invoke_live_metrics_custom_trend",
|
|
121
|
+
"goal": "在当前页面会话内直接调用自定义时间趋势接口",
|
|
122
|
+
"when": "notEquals(payload.requestDateType, 'today')",
|
|
123
|
+
"tool": "invoke_page_request",
|
|
203
124
|
"args": {
|
|
204
|
-
"
|
|
205
|
-
"
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
125
|
+
"sourceId": "live_metrics_custom_trend",
|
|
126
|
+
"payload": {
|
|
127
|
+
"dateRange": "{{data.requestDateRange}}",
|
|
128
|
+
"device": "{{data.device}}"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
210
131
|
},
|
|
211
132
|
{
|
|
212
|
-
"nodeId": "
|
|
213
|
-
"name": "
|
|
214
|
-
"goal": "
|
|
215
|
-
"when": "equals(payload.invokeDirectly, true)",
|
|
133
|
+
"nodeId": "s6",
|
|
134
|
+
"name": "hide_live_metrics_activity",
|
|
135
|
+
"goal": "在首页指标采集结束后关闭页面提示",
|
|
216
136
|
"tool": "present_page_activity",
|
|
217
137
|
"args": {
|
|
218
138
|
"mode": "stop"
|
|
219
139
|
}
|
|
220
140
|
},
|
|
221
141
|
{
|
|
222
|
-
"nodeId": "
|
|
142
|
+
"nodeId": "s7",
|
|
223
143
|
"name": "switch_to_existing_host_tab",
|
|
224
144
|
"goal": "任务结束后若存在匹配的既有标签页则切回去",
|
|
225
145
|
"when": "exists(payload.returnHostPatterns)",
|