publishport-opencli 1.0.37 → 1.0.39

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publishport-opencli",
3
- "version": "1.0.37",
3
+ "version": "1.0.39",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": false
@@ -201,10 +201,31 @@ ppcli browser site:douyin captcha-click --adapter --crop --in 'iframe[src*="/ver
201
201
  # 从截图核对编号后,以相同坐标系单独点确认按钮,再检查结果。
202
202
  ```
203
203
 
204
- `--adapter` 仅用于 `captcha` / `captcha-click`,session 必须是 `site:<平台>`,并沿用原命令的 `--profile`。它定位平台适配器原有标签,不要求用户切换当前标签或 bind。抖音跨域 iframe 会整块裁剪,包含题目、图片和确认按钮;`prompt` 可能为空,直接看 `crop` 读题。`--crop` 比例基于整张裁剪图,已经处理视口边缘、缩放和留白,不能混用页面截图坐标。显式选择器失效会报错,不会自动改点其他元素。题目刷新后必须重新截图,旧坐标不能沿用;超时可刷新新题,及时完成点选和确认。验证码操作不会自动重发原评论、点赞等写命令。
204
+ `--adapter` 仅用于 `captcha` / `captcha-click` / `captcha-slide` / `captcha-rotate` / `captcha-drag`,session 必须是 `site:<平台>`,并沿用原命令的 `--profile`。它定位平台适配器原有标签,不要求用户切换当前标签或 bind。抖音跨域 iframe 会整块裁剪,包含题目、图片和确认按钮;`prompt` 可能为空,直接看 `crop` 读题。`--crop` 比例基于整张裁剪图,已经处理视口边缘、缩放和留白,不能混用页面截图坐标。显式选择器失效会报错,不会自动改点其他元素。题目刷新后必须重新截图,旧坐标不能沿用;超时可刷新新题,及时完成点选和确认。验证码操作不会自动重发原评论、点赞等写命令。
205
205
 
206
206
  提醒:验证码识别靠视觉,扭曲字**可能认错**(尤其岩石/云等低对比背景、生僻复杂字)——背景太乱认不清就点刷新按钮换一张(`.js-mocaptcha-refresh` 之类,刷新不提交、无害,多数会换到干净背景)。别短时间反复猛试同一账号(会抬高风控/被判异常),一两次不过就退回让用户手动点。
207
207
 
208
+ ### Drag captcha (滑块 / 拼图 / 旋转验证码)
209
+
210
+ 拖动类验证码的距离和角度**你不用估**——容差只有几像素,目测必失败。你只指出把手和图片在哪,工具自己量、自己纠偏,轨迹按人手:
211
+
212
+ 1. `browser <s> captcha [selector] --grid` → crop 图上画着网格,刻度是 crop 里的 CSS 像素(左上角 0,0)。
213
+ 2. 看 crop 认类型,按刻度读位置,传与第 1 步相同的 `--in <selector>`:
214
+
215
+ | 类型 | command |
216
+ |------|---------|
217
+ | 缺口拼图(左边一块拼图、右边同形状缺口,「拖动滑块填充拼图」) | `browser <s> captcha-slide --in <sel> --handle x,y --picture x,y,宽,高 [--gap 目测距离]` |
218
+ | 旋转拼图(中间圆图和外圈一起转,抖音 / 字节验证中心) | `browser <s> captcha-rotate --in <sel> --handle x,y --track 把手大概能拖多远 --center x,y --radius 内圈圆图半径` |
219
+ | 「按住滑块拖到最右边」这类无图滑块 | `browser <s> captcha-drag --in <sel> --handle x,y --dx 轨道剩余长度` |
220
+
221
+ `--handle` 是把手中心,`--picture` 框整张带缺口的图(不含下面的滑条)。`captcha-slide` 认不出拼图会拖回原位、不交卷并报错,重新 `--grid` 截图看清再来;别改用 `captcha-drag` 自己估距离。命令返回 `ok` 只表示拖完松手,用 `--save` 截图看是否通过:换了新图就再来一次,「验证超时」先刷新。平台适配器弹出时同样加 `--adapter` 并沿用原 `--profile`。
222
+
223
+ ```bash
224
+ ppcli browser site:douyin captcha --adapter --grid 'iframe[src*="/verifycenter/captcha/"]'
225
+ # 看 crop:旋转拼图,把手中心约 (40,262),能拖约 230,圆心 (170,120),内圈半径 55
226
+ ppcli browser site:douyin captcha-rotate --adapter --in 'iframe[src*="/verifycenter/captcha/"]' --handle 40,262 --track 230 --center 170,120 --radius 55 --save /tmp/douyin-after.png
227
+ ```
228
+
208
229
  ### Wait
209
230
 
210
231
  ```bash