harvest_cookies
Extracts cookies from your own browser session via Chrome DevTools Protocol, including HttpOnly cookies, to enable authenticated scraping of Chinese platforms. Requires the browser to be running on a specified port.
Instructions
从用户自己的浏览器会话中自动提取 cookie(包括 HttpOnly cookie)。
通过 Chrome DevTools Protocol (CDP) 的 Network.getAllCookies 提取 浏览器 cookie jar 中的所有 cookie(含 HttpOnly,这是 JS 无法获取的)。 仅提取用户自己的浏览器会话——浏览器须已在指定端口运行且已登录。
非 profile 平台的 Cookie 保存到认证注册表指定的 JSON 文件。 京东使用持久化 Chrome profile,请改用 guided_login。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | CDP 调试端口 (可选, 各平台有默认值) | |
| platform | Yes | 认证注册表中的平台名。京东会返回 profile_required。 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||