publishport-opencli 1.0.62 → 1.0.64
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/clis/douyin/draft.js +82 -30
- package/clis/douyin/publish.js +9 -9
- package/clis/wechat-channels/publish.js +63 -33
- package/clis/xiaohongshu/publish.js +20 -39
- package/dist/src/browser/extract.d.ts +7 -0
- package/dist/src/browser/extract.js +7 -5
- package/dist/src/cli.js +12 -12
- package/package.json +1 -1
- package/skills/opencli-browser/SKILL.md +2 -1
package/package.json
CHANGED
|
@@ -247,7 +247,7 @@ state, elapsedMs}` on success and a JSON error envelope on timeout/failure.
|
|
|
247
247
|
|
|
248
248
|
- **`web read --url <url>`** — One-shot Markdown reader for arbitrary pages. It expands relevant same-origin iframes by default, so old iframe-shell sites work better than with a top-document-only scrape. Use `--frames all-same-origin` when completeness matters more than Markdown noise. For AJAX shell pages use `ppcli web read --url <url> --wait-for "<selector>" --wait-until networkidle --diagnose`; diagnostics show frame URLs, empty containers, and API-like XHRs. If the value you need is table/API data, switch to `browser network` or a dedicated adapter instead of relying on Markdown.
|
|
249
249
|
- **`browser eval <js> [--frame N]`** — Run an expression in the page (or in a cross-origin frame via `--frame`). Wrap in an IIFE and return JSON. Read-only: no `document.forms[0].submit()`, no clicks, no navigations. If the result is a string, stdout is the raw string; otherwise it's JSON.
|
|
250
|
-
- **`browser extract [--selector <css>] [--chunk-size N] [--start N]`** — Markdown extraction of long-form content with a continuation cursor. Returns `{url, title, selector, total_chars, chunk_size, start, end, next_start_char, content}`. Loop on `next_start_char` until it is `null`. Auto-scopes to `<main>`/`<article>`/`<body>` if you don't pass `--selector`.
|
|
250
|
+
- **`browser extract [--selector <css>] [--chunk-size N] [--start N]`** — Markdown extraction of long-form content with a continuation cursor. Returns `{url, title, selector, total_chars, chunk_size, start, end, next_start_char, content}`. Loop on `next_start_char` until it is `null`. Auto-scopes to `<main>`/`<article>`/`<body>` if you don't pass `--selector`. To check a few facts on a long page (balance, login name, coupon count), pass `--grep "余额|优惠券"`: `content` holds only the matching lines and the envelope adds `matched_lines`, `total_lines`, `page_chars`.
|
|
251
251
|
|
|
252
252
|
### Network
|
|
253
253
|
|
|
@@ -349,6 +349,7 @@ Think about payload size per call. Budgets exist for a reason.
|
|
|
349
349
|
| `get html --as json --depth 3 --children-max 20` | medium | When you need to reason about structure, not a specific field. |
|
|
350
350
|
| `screenshot` | large | Only when the page is visual (CAPTCHA, charts). Prefer `state`. |
|
|
351
351
|
| `extract` | medium per chunk | Long-form reading. Loop via `next_start_char`. |
|
|
352
|
+
| `extract --grep <regex>` | small | A few facts from a long page; only matching lines. |
|
|
352
353
|
| `network` (default) | small | First look at APIs. |
|
|
353
354
|
| `network --detail <key>` | varies | Pull one body. |
|
|
354
355
|
| `network --raw` | huge | Only after `--filter` narrowed the candidate set. |
|