oc-browser-relay 1.0.8 → 1.0.10

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.
@@ -24367,7 +24367,7 @@ var STEP_DISPATCH_INTERVAL_MS = Number(process.env.STEP_DISPATCH_INTERVAL_MS) ||
24367
24367
  var RUNTIME_ONLINE_GRACE_MS = 1e4;
24368
24368
  var RUNTIME_PRESENCE_TTL_MS = 5 * 60 * 1e3;
24369
24369
  var COMPLETED_TASK_TTL_MS = Number(process.env.COMPLETED_TASK_TTL_MS) || 60 * 60 * 1e3;
24370
- var STEP_WATCHDOG_FALLBACK_TIMEOUT_MS = 6e4;
24370
+ var STEP_WATCHDOG_FALLBACK_TIMEOUT_MS = 12e4;
24371
24371
  var STEP_WATCHDOG_DEFAULT_TIMEOUTS = {
24372
24372
  upload_assets: 18e4,
24373
24373
  fill_field: 12e4,
@@ -18,12 +18,21 @@
18
18
  "value": "/ffa/mshop/homepage/index"
19
19
  },
20
20
  {
21
- "type": "element_visible",
22
- "selector": "label:has(input[type='radio'][value='Real']), label:has(input[type='radio'][value='Day'])"
21
+ "type": "logical_or",
22
+ "conditions": [
23
+ {
24
+ "type": "element_visible",
25
+ "selector": "label:has(input[type='radio'][value='Real']), label:has(input[type='radio'][value='Day'])"
26
+ },
27
+ {
28
+ "type": "element_visible",
29
+ "selector": "div.auxo-select-selector:has(input[role='combobox'][aria-haspopup='listbox'])"
30
+ }
31
+ ]
23
32
  }
24
33
  ]
25
34
  },
26
- "waitTimeoutMs": 15000
35
+ "waitTimeoutMs": 30000
27
36
  },
28
37
  "reusePolicy": {
29
38
  "enabled": true,
@@ -51,7 +60,7 @@
51
60
  "waitForUrlMatch": [
52
61
  "https://fxg.jinritemai.com/ffa/mshop/homepage/index*"
53
62
  ],
54
- "waitTimeoutMs": 15000,
63
+ "waitTimeoutMs": 30000,
55
64
  "settleDelayMs": 600
56
65
  }
57
66
  ]
@@ -83,6 +92,55 @@
83
92
  "label": "切换首页时间粒度",
84
93
  "kind": "click",
85
94
  "skipPopupGuard": true,
95
+ "locatorWaitTimeoutMs": 5000,
96
+ "dropdownFallback": {
97
+ "panelSelector": ".auxo-select-dropdown:not(.auxo-select-dropdown-hidden)",
98
+ "panelWaitTimeoutMs": 5000,
99
+ "triggerLocators": [
100
+ {
101
+ "kind": "xpath",
102
+ "value": "//div[contains(@class,'auxo-select-selector')][.//span[contains(@class,'auxo-select-selection-item')][contains(normalize-space(.),'实时') or contains(normalize-space(.),'近1天') or contains(normalize-space(.),'近7天') or contains(normalize-space(.),'近30天') or contains(normalize-space(.),'大促')]]",
103
+ "priority": 1
104
+ }
105
+ ],
106
+ "optionLocatorsByValue": {
107
+ "Real": [
108
+ {
109
+ "kind": "xpath",
110
+ "value": "//div[contains(@class,'auxo-select-dropdown') and not(contains(@class,'auxo-select-dropdown-hidden'))]//div[contains(@class,'auxo-select-item-option')][.//div[contains(@class,'auxo-select-item-option-content') and normalize-space()='实时']]",
111
+ "priority": 1
112
+ }
113
+ ],
114
+ "Day": [
115
+ {
116
+ "kind": "xpath",
117
+ "value": "//div[contains(@class,'auxo-select-dropdown') and not(contains(@class,'auxo-select-dropdown-hidden'))]//div[contains(@class,'auxo-select-item-option')][.//div[contains(@class,'auxo-select-item-option-content') and normalize-space()='近1天']]",
118
+ "priority": 1
119
+ }
120
+ ],
121
+ "Week": [
122
+ {
123
+ "kind": "xpath",
124
+ "value": "//div[contains(@class,'auxo-select-dropdown') and not(contains(@class,'auxo-select-dropdown-hidden'))]//div[contains(@class,'auxo-select-item-option')][.//div[contains(@class,'auxo-select-item-option-content') and normalize-space()='近7天']]",
125
+ "priority": 1
126
+ }
127
+ ],
128
+ "Month": [
129
+ {
130
+ "kind": "xpath",
131
+ "value": "//div[contains(@class,'auxo-select-dropdown') and not(contains(@class,'auxo-select-dropdown-hidden'))]//div[contains(@class,'auxo-select-item-option')][.//div[contains(@class,'auxo-select-item-option-content') and normalize-space()='近30天']]",
132
+ "priority": 1
133
+ }
134
+ ],
135
+ "Promotion": [
136
+ {
137
+ "kind": "xpath",
138
+ "value": "//div[contains(@class,'auxo-select-dropdown') and not(contains(@class,'auxo-select-dropdown-hidden'))]//div[contains(@class,'auxo-select-item-option')][.//div[contains(@class,'auxo-select-item-option-content') and normalize-space()='大促']]",
139
+ "priority": 1
140
+ }
141
+ ]
142
+ }
143
+ },
86
144
  "locators": [
87
145
  {
88
146
  "kind": "xpath",
@@ -107,12 +165,12 @@
107
165
  },
108
166
  "capturePlans": {
109
167
  "homepage_metrics": {
110
- "sourceId": "homepage_metrics",
111
- "captureNetwork": {
112
- "timeoutMs": 15000,
113
- "startPhase": "before_action",
114
- "actionScope": "step"
115
- }
168
+ "sourceId": "homepage_metrics",
169
+ "captureNetwork": {
170
+ "timeoutMs": 600000,
171
+ "startPhase": "before_action",
172
+ "actionScope": "step"
173
+ }
116
174
  }
117
175
  },
118
176
  "crawlerHints": {
@@ -132,7 +190,7 @@
132
190
  "homepage_metrics_capture": {
133
191
  "adapterId": "douyin_fxg_homepage_capture",
134
192
  "sourceId": "homepage_metrics_capture",
135
- "timeoutMs": 30000,
193
+ "timeoutMs": 600000,
136
194
  "observationSources": [
137
195
  {
138
196
  "sourceId": "homepage_metrics_capture",
@@ -57,6 +57,13 @@
57
57
  "actionId": "open_comments",
58
58
  "label": "打开评论面板",
59
59
  "kind": "click",
60
+ "scrollSearchFallback": {
61
+ "maxScrollAttempts": 4,
62
+ "scrollDeltaPx": 720,
63
+ "settleDelayMs": 250,
64
+ "initialLocateTimeoutMs": 3000,
65
+ "retryLocateTimeoutMs": 3000
66
+ },
60
67
  "locators": [
61
68
  {
62
69
  "kind": "css",
@@ -86,6 +93,13 @@
86
93
  "actionId": "open_ask_answers",
87
94
  "label": "打开问大家面板",
88
95
  "kind": "click",
96
+ "scrollSearchFallback": {
97
+ "maxScrollAttempts": 4,
98
+ "scrollDeltaPx": 720,
99
+ "settleDelayMs": 250,
100
+ "initialLocateTimeoutMs": 3000,
101
+ "retryLocateTimeoutMs": 3000
102
+ },
89
103
  "locators": [
90
104
  {
91
105
  "kind": "css",
@@ -281,6 +281,9 @@
281
281
  }
282
282
  },
283
283
  "executionPolicy": {
284
+ "popupGuard": {
285
+ "enabled": false
286
+ },
284
287
  "typingPolicy": {
285
288
  "mode": "human_typing",
286
289
  "minKeyDelayMs": 120,
@@ -23,7 +23,7 @@
23
23
  { "kind": "xpath", "value": "//div[.//div[normalize-space(text())='发布视频'] and .//div[contains(normalize-space(.), '推荐mp4、webm')]]", "priority": 2 },
24
24
  { "kind": "css", "value": "a[href*='/content/upload']", "priority": 3 }
25
25
  ],
26
- "readyTimeoutMs": 8000
26
+ "readyTimeoutMs": 30000
27
27
  }
28
28
  }
29
29
  }
@@ -37,9 +37,9 @@
37
37
  { "kind": "text", "value": "上传图文", "priority": 2 }
38
38
  ],
39
39
  "hoverDelayMs": 300,
40
- "menuWaitTimeoutMs": 2500,
40
+ "menuWaitTimeoutMs": 10000,
41
41
  "settleDelayMs": 1200,
42
- "readyTimeoutMs": 8000
42
+ "readyTimeoutMs": 30000
43
43
  }
44
44
  }
45
45
  }
@@ -4,8 +4,7 @@
4
4
  "platform": "douyin",
5
5
  "name": "采集抖店首页经营看板指标",
6
6
  "description": "打开抖店商家后台首页,切换指定时间粒度按钮,捕获首页接口响应并返回结构化经营数据。",
7
- "requiredFields": [
8
- ],
7
+ "requiredFields": [],
9
8
  "optionalFields": [
10
9
  {
11
10
  "name": "pageUrl",
@@ -45,6 +44,9 @@
45
44
  "tool": "trigger_action",
46
45
  "args": {
47
46
  "action": "switch_metric_period",
47
+ "actionInput": {
48
+ "metricPeriodValue": "Day"
49
+ },
48
50
  "locators": [
49
51
  {
50
52
  "kind": "xpath",
@@ -62,6 +64,9 @@
62
64
  "tool": "trigger_action",
63
65
  "args": {
64
66
  "action": "switch_metric_period",
67
+ "actionInput": {
68
+ "metricPeriodValue": "Real"
69
+ },
65
70
  "locators": [
66
71
  {
67
72
  "kind": "xpath",
@@ -79,6 +84,9 @@
79
84
  "tool": "trigger_action",
80
85
  "args": {
81
86
  "action": "switch_metric_period",
87
+ "actionInput": {
88
+ "metricPeriodValue": "Real"
89
+ },
82
90
  "locators": [
83
91
  {
84
92
  "kind": "xpath",
@@ -96,6 +104,9 @@
96
104
  "tool": "trigger_action",
97
105
  "args": {
98
106
  "action": "switch_metric_period",
107
+ "actionInput": {
108
+ "metricPeriodValue": "Real"
109
+ },
99
110
  "locators": [
100
111
  {
101
112
  "kind": "xpath",
@@ -113,6 +124,9 @@
113
124
  "tool": "trigger_action",
114
125
  "args": {
115
126
  "action": "switch_metric_period",
127
+ "actionInput": {
128
+ "metricPeriodValue": "Real"
129
+ },
116
130
  "locators": [
117
131
  {
118
132
  "kind": "xpath",
@@ -129,6 +143,9 @@
129
143
  "tool": "trigger_action",
130
144
  "args": {
131
145
  "action": "switch_metric_period",
146
+ "actionInput": {
147
+ "metricPeriodValue": "{{data.metricPeriodValue}}"
148
+ },
132
149
  "locators": [
133
150
  {
134
151
  "kind": "xpath",