benchmark-collector 1.6.0 → 1.6.1

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.
Files changed (2) hide show
  1. package/README.md +12 -6
  2. package/package.json +4 -2
package/README.md CHANGED
@@ -157,15 +157,18 @@ output/处理退款_2026-03-22T10-00-00/
157
157
  页面:`https://jsls.jinritemai.com/im/shop/main/data/historyConversation`,接口:`fuzzySearchConversation`。
158
158
 
159
159
  ```bash
160
- # 默认运行(自动注入本地 Chrome Cookie,有头模式)
161
- npm run feige-history
160
+ # 全局安装后直接运行
161
+ benchmark-feige-history
162
162
 
163
163
  # 自定义参数
164
- npx ts-node scripts/feige-history-collect.ts \
164
+ benchmark-feige-history \
165
165
  --max-pages 100 \ # 最大账号列表翻页数(默认 100)
166
166
  --delay 1000 \ # 每次翻页间隔,避免限流(默认 1000ms)
167
167
  --output ./data \ # 输出目录(默认 output)
168
168
  --headless # 无头模式
169
+
170
+ # 本地开发模式
171
+ npm run feige-history
169
172
  ```
170
173
 
171
174
  流程:打开页面 → 选"近30天" → 点击查询 → 拦截 `fuzzySearchConversation` → 自动翻页直到采集全部 → 保存到 `output/feige-history_<timestamp>.json`。
@@ -175,16 +178,19 @@ npx ts-node scripts/feige-history-collect.ts \
175
178
  页面:`https://mms.pinduoduo.com/mms-chat/search?msfrom=mms_sidenav`,接口:`getMessages`。
176
179
 
177
180
  ```bash
178
- # 默认运行
179
- npm run pdd-history
181
+ # 全局安装后直接运行
182
+ benchmark-pdd-history
180
183
 
181
184
  # 自定义参数
182
- npx ts-node scripts/pdd-history-collect.ts \
185
+ benchmark-pdd-history \
183
186
  --max-accounts 200 \ # 最多采集消费者账号数(默认 500)
184
187
  --max-msg-pages 20 \ # 每个账号最多翻多少页消息(默认 20)
185
188
  --delay 600 \ # 操作间隔(默认 600ms)
186
189
  --output ./data \
187
190
  --headless
191
+
192
+ # 本地开发模式
193
+ npm run pdd-history
188
194
  ```
189
195
 
190
196
  流程:打开页面 → 选"近30天" → 点击查询 → 遍历左侧 `.user-item` 消费者账号列表 → 每个账号点击后遍历右侧消息分页 → 拦截 `getMessages` 累积全部消息 → 保存到 `output/pdd-history_<timestamp>.json`。
package/package.json CHANGED
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "name": "benchmark-collector",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "Playwright-based benchmark data collector for web agent training",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
7
7
  "bin": {
8
8
  "benchmark-collect": "dist/scripts/collect.js",
9
9
  "benchmark-collector": "dist/scripts/collect.js",
10
- "benchmark-replay": "dist/scripts/replay.js"
10
+ "benchmark-replay": "dist/scripts/replay.js",
11
+ "benchmark-feige-history": "dist/scripts/feige-history-collect.js",
12
+ "benchmark-pdd-history": "dist/scripts/pdd-history-collect.js"
11
13
  },
12
14
  "files": [
13
15
  "dist/src/**/*.js",