cloak_interact
Execute a sequence of browser actions (goto, click, fill) and extract text or HTML from the final page.
Instructions
在單一 session 內依序執行多個瀏覽器動作,最後擷取結果。
actions 是動作清單,第一個通常是 goto。每個動作是一個 dict,type 可為: {"type":"goto","url":"...","wait_until":"domcontentloaded"} {"type":"click","selector":"button#login"} {"type":"fill","selector":"#email","value":"a@b.com"} {"type":"type","selector":"#q","value":"hello","delay":40} {"type":"press","selector":"#q","keys":"Enter"} {"type":"select","selector":"#country","value":"TW"} {"type":"scroll","dy":1500} {"type":"wait_selector","selector":".results","timeout_ms":15000} {"type":"wait_ms","ms":1500}
extract: text | html | none(最終要回傳的內容形式)。 selector: extract=text 時只取此元素文字。 screenshot_path: 給定則動作跑完後再截一張整頁圖。 其餘反偵測參數同 cloak_get_text;表單 / 登入流程建議 humanize=True。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| actions | Yes | ||
| extract | No | text | |
| selector | No | ||
| screenshot_path | No | ||
| timeout_ms | No | ||
| max_chars | No | ||
| humanize | No | ||
| headless | No | ||
| proxy | No | ||
| geoip | No | ||
| timezone | No | ||
| locale | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |