Skip to content

Commit cc2ea44

Browse files
committed
docs: add key concepts section and move full API comparison
1 parent be83643 commit cc2ea44

File tree

1 file changed

+34
-18
lines changed

1 file changed

+34
-18
lines changed

integrations/migrations/scrapybara/scrapybara.mdx

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,17 @@ This guide shows you how to migrate your Scrapybara browser automation code to K
88

99
---
1010

11-
## Browser API Comparison
11+
## Key Concepts
1212

1313
| Feature | Scrapybara | Kernel |
1414
|---------|-----------|--------|
15-
| **Create Browser** | `client.start_browser()``instance.browser.start()` | `client.browsers.create()` |
16-
| **Get CDP URL** | `instance.browser.get_cdp_url()` | Returns `cdp_ws_url` in create response |
17-
| **Get Live View** | `instance.get_stream_url()` | Returns `browser_live_view_url` in create response |
18-
| **Delete Browser** | `instance.browser.stop()` | `client.browsers.deleteByID(session_id)` |
19-
| **List Browsers** | `client.get_instances()` | `client.browsers.list()` |
20-
| **Save Auth State** | `instance.browser.save_auth(name)` | Create profile with `save_changes: true` |
21-
| **Load Auth State** | `instance.browser.authenticate(auth_state_id)` | `client.browsers.create({ profile: { name } })` |
22-
| **Pause/Resume** | `instance.pause()` / `instance.resume()` | Automatic standby mode (no manual control) |
23-
| **Screenshot** | `instance.screenshot()` | Use Playwright after CDP connection |
24-
| **Timeout Config** | `timeout_hours` parameter | `timeout_seconds` parameter |
15+
| **Start Browser** | `client.start_browser()``instance.browser.start()` | `client.browsers.create()` |
16+
| **Standby Mode** | `instance.pause()` / `instance.resume()` | Automatic standby mode (no manual control) |
17+
| **CDP URL** | `instance.browser.get_cdp_url()` | Returns `cdp_ws_url` in create response |
18+
| **Live View** | `instance.get_stream_url()` | Returns `browser_live_view_url` in create response |
2519
| **Stealth Mode** | ❌ Not available | `stealth: true` parameter |
26-
| **Headless Mode** | Not explicitly documented | `headless: true` parameter |
27-
| **Session Persistence** | Auth state only | Full state via `persistence: { id }` |
28-
| **Video Replays** | ❌ Not available | `client.browsers.replays.*` |
29-
| **File Upload** | `instance.upload()` | `client.browsers.fs.upload()` or Playwright |
30-
| **File Download** | Via browser, then `instance.file()` | `client.browsers.fs.readFile()` |
31-
| **Process Control** | `instance.bash()` | `client.browsers.process.*` |
32-
| **Proxy Support** | Not documented | `proxy_id` parameter + `client.proxies.*` |
20+
| **Replays** | ❌ Not available | `client.browsers.replays.*` |
21+
| **Save Auth** | `instance.browser.save_auth(name)` | Create profile with `save_changes: true` |
3322

3423
---
3524

@@ -187,6 +176,33 @@ browser2 = await client.browsers.create(
187176

188177
---
189178

179+
---
180+
181+
## Full API Comparison
182+
183+
| Feature | Scrapybara | Kernel |
184+
|---------|-----------|--------|
185+
| **Create Browser** | `client.start_browser()``instance.browser.start()` | `client.browsers.create()` |
186+
| **Get CDP URL** | `instance.browser.get_cdp_url()` | Returns `cdp_ws_url` in create response |
187+
| **Get Live View** | `instance.get_stream_url()` | Returns `browser_live_view_url` in create response |
188+
| **Delete Browser** | `instance.browser.stop()` | `client.browsers.deleteByID(session_id)` |
189+
| **List Browsers** | `client.get_instances()` | `client.browsers.list()` |
190+
| **Save Auth State** | `instance.browser.save_auth(name)` | Create profile with `save_changes: true` |
191+
| **Load Auth State** | `instance.browser.authenticate(auth_state_id)` | `client.browsers.create({ profile: { name } })` |
192+
| **Pause/Resume** | `instance.pause()` / `instance.resume()` | Automatic standby mode (no manual control) |
193+
| **Screenshot** | `instance.screenshot()` | Use Playwright after CDP connection |
194+
| **Timeout Config** | `timeout_hours` parameter | `timeout_seconds` parameter |
195+
| **Stealth Mode** | ❌ Not available | `stealth: true` parameter |
196+
| **Headless Mode** | Not explicitly documented | `headless: true` parameter |
197+
| **Session Persistence** | Auth state only | Full state via `persistence: { id }` |
198+
| **Video Replays** | ❌ Not available | `client.browsers.replays.*` |
199+
| **File Upload** | `instance.upload()` | `client.browsers.fs.upload()` or Playwright |
200+
| **File Download** | Via browser, then `instance.file()` | `client.browsers.fs.readFile()` |
201+
| **Process Control** | `instance.bash()` | `client.browsers.process.*` |
202+
| **Proxy Support** | Not documented | `proxy_id` parameter + `client.proxies.*` |
203+
204+
---
205+
190206
## Need Help?
191207

192208
* **Documentation**: [docs.onkernel.com](https://www.onkernel.com/docs/introduction)

0 commit comments

Comments
 (0)