跳到正文
cccskills
免费在 GitHub 公开

browser-cash

Create remote browser sessions with Browser.cash and connect through Playwright, Puppeteer, or CDP. Use them for scraping, form filling, testing, and screenshots, with options for country, window size, and persistent browser profiles.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Spin up unblocked browser sessions via Browser.cash for web automation. Sessions bypass anti-bot protections (Cloudflare, DataDome, etc.) making them ideal for scraping and automation.

sundial-org/awesome-openclaw-skills星标 671(GitHub 671 + cccskills 0)

实测评分 未实测

查看安装方法

适用场景

  • Scraping pages that block ordinary browser automation
  • Filling forms in a remote browser session
  • Testing pages and capturing screenshots
  • Keeping cookies and login state in a browser profile

包含的文件(1)

  • SKILL.md8.7 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

browser-cash

Spin up unblocked browser sessions via Browser.cash for web automation. These sessions bypass common anti-bot protections (Cloudflare, DataDome, etc.), making them ideal for scraping, testing, and automation tasks that would otherwise get blocked.

When to use: Any browser automation task—scraping, form filling, testing, screenshots. Browser.cash sessions appear as real browsers and handle bot detection automatically.

Setup

API Key is stored in clawdbot config at skills.entries.browser-cash.apiKey.

If not configured, prompt the user:

Get your API key from https://dash.browser.cash and run:

clawdbot config set skills.entries.browser-cash.apiKey "your_key_here"

Reading the key:

BROWSER_CASH_KEY=$(clawdbot config get skills.entries.browser-cash.apiKey)

Before first use, check and install Playwright if needed:

if [ ! -d ~/clawd/node_modules/playwright ]; then
  cd ~/clawd && npm install playwright puppeteer-core
fi

API Basics

curl -X POST "https://api.browser.cash/v1/..." \
  -H "Authorization: Bearer $BROWSER_CASH_KEY" \
  -H "Content-Type: application/json"

Create a Browser Session

Basic session:

curl -X POST "https://api.browser.cash/v1/browser/session" \
  -H "Authorization: Bearer $BROWSER_CASH_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Response:

{
  "sessionId": "abc123...",
  "status": "active",
  "servedBy": "node-id",
  "createdAt": "2025-01-20T01:51:25.000Z",
  "stoppedAt": null,
  "cdpUrl": "wss://gcp-usc1-1.browser.cash/v1/consumer/abc123.../devtools/browser/uuid"
}

With options:

curl -X POST "https://api.browser.cash/v1/browser/session" \
  -H "Authorization: Bearer $BROWSER_CASH_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "country": "US",
    "windowSize": "1920x1080",
    "profile": {
      "name": "my-profile",
      "persist": true
    }
  }'

Session Options

OptionTypeDescription
countrystring2-letter ISO code (e.g., "US", "DE", "GB")
windowSizestringBrowser dimensions, e.g., "1920x1080"
proxyUrlstringSOCKS5 proxy URL (optional)
profile.namestringNamed browser profile for session persistence
profile.persistbooleanSave cookies/storage after session ends

Using Browser.cash with Clawdbot

Browser.cash returns a WebSocket CDP URL (wss://...). Use one of these approaches:

Option 1: Direct CDP via exec (Recommended)

Important: Before running Playwright/Puppeteer scripts, ensure dependencies are installed:

[ -d ~/clawd/node_modules/playwright ] || (cd ~/clawd && npm install playwright puppeteer-core)

Use Playwright or Puppeteer in an exec block to connect directly to the CDP URL:

# 1. Create session
BROWSER_CASH_KEY=$(clawdbot config get skills.entries.browser-cash.apiKey)
SESSION=$(curl -s -X POST "https://api.browser.cash/v1/browser/session" \
  -H "Authorization: Bearer $BROWSER_CASH_KEY" \
  -H "Content-Type: application/json" \
  -d '{"country": "US", "windowSize": "1920x1080"}')

SESSION_ID=$(echo $SESSION | jq -r '.sessionId')
CDP_URL=$(echo $SESSION | jq -r '.cdpUrl')

# 2. Use via Node.js exec (Playwright)
node -e "
const { chromium } = require('playwright');
(async () => {
  const browser = await chromium.connectOverCDP('$CDP_URL');
  const context = browser.contexts()[0];
  const page = context.pages()[0] || await context.newPage();
  await page.goto('https://example.com');
  console.log('Title:', await page.title());
  await browser.close();
})();
"

# 3. Stop session when done
curl -X DELETE "https://api.browser.cash/v1/browser/session?sessionId=$SESSION_ID" \
  -H "Authorization: Bearer $BROWSER_CASH_KEY"

Option 2: Curl-based automation

For simple tasks, use curl to interact with pages via CDP commands:

# Navigate and extract content using the CDP URL
# (See CDP protocol docs for available methods)

Note on Clawdbot browser tool

Clawdbot's native browser tool expects HTTP control server URLs, not raw WebSocket CDP. The gateway config.patch approach works when Clawdbot's browser control server proxies the connection. For direct Browser.cash CDP, use the exec approach above.

Get Session Status

curl "https://api.browser.cash/v1/browser/session?sessionId=YOUR_SESSION_ID" \
  -H "Authorization: Bearer $BROWSER_CASH_KEY"

Statuses: starting, active, completed, error

Stop a Session

curl -X DELETE "https://api.browser.cash/v1/browser/session?sessionId=YOUR_SESSION_ID" \
  -H "Authorization: Bearer $BROWSER_CASH_KEY"

List Sessions

curl "https://api.browser.cash/v1/browser/sessions?page=1&pageSize=20" \
  -H "Authorization: Bearer $BROWSER_CASH_KEY"

Browser Profiles

Profiles persist cookies, localStorage, and session data across sessions—useful for staying logged in or maintaining state.

List profiles:

curl "https://api.browser.cash/v1/browser/profiles" \
  -H "Authorization: Bearer $BROWSER_CASH_KEY"

Delete profile:

curl -X DELETE "https://api.browser.cash/v1/browser/profile?profileName=my-profile" \
  -H "Authorization: Bearer $BROWSER_CASH_KEY"

Connecting via CDP

The cdpUrl is a WebSocket endpoint for Chrome DevTools Protocol. Use it with any CDP-compatible library.

Playwright:

const { chromium } = require('playwright');
const browser = await chromium.connectOverCDP(cdpUrl);
const context = browser.contexts()[0];
const page = context.pages()[0] || await context.newPage();
await page.goto('https://example.com');

Puppeteer:

const puppeteer = require('puppeteer-core');
const browser = await puppeteer.connect({ browserWSEndpoint: cdpUrl });
const pages = await browser.pages();
const page = pages[0] || await browser.newPage();
await page.goto('https://example.com');

Full Workflow Example

# 0. Ensure Playwright is installed
[ -d ~/clawd/node_modules/playwright ] || (cd ~/clawd && npm install playwright puppeteer-core)

# 1. Create session
BROWSER_CASH_KEY=$(clawdbot config get skills.entries.browser-cash.apiKey)
SESSION=$(curl -s -X POST "https://api.browser.cash/v1/browser/session" \
  -H "Authorization: Bearer $BROWSER_CASH_KEY" \
  -H "Content-Type: application/json" \
  -d '{"country": "US", "windowSize": "1920x1080"}')

SESSION_ID=$(echo $SESSION | jq -r '.sessionId')
CDP_URL=$(echo $SESSION | jq -r '.cdpUrl')

# 2. Connect with Playwright/Puppeteer using $CDP_URL...

# 3. Stop session when done
curl -X DELETE "https://api.browser.cash/v1/browser/session?sessionId=$SESSION_ID" \
  -H "Authorization: Bearer $BROWSER_CASH_KEY"

Scraping Tips

When extracting data from pages with lazy-loading or infinite scroll:

// Scroll to load all products
async function scrollToBottom(page) {
  let previousHeight = 0;
  while (true) {
    const currentHeight = await page.evaluate(() => document.body.scrollHeight);
    if (currentHeight === previousHeight) break;
    previousHeight = currentHeight;
    await page.evaluate(() => window.scrollTo(0, document.body.scrollHeight));
    await page.waitForTimeout(1500); // Wait for content to load
  }
}

// Wait for specific elements
await page.waitForSelector('.product-card', { timeout: 10000 });

// Handle "Load More" buttons
const loadMore = await page.$('button.load-more');
if (loadMore) {
  await loadMore.click();
  await page.waitForTimeout(2000);
}

Common patterns:

  • Always scroll to trigger lazy-loaded content
  • Wait for network idle: await page.waitForLoadState('networkidle')
  • Use page.waitForSelector() before extracting elements
  • Add delays between actions to avoid rate limiting

Why Browser.cash for Automation

  • Unblocked: Sessions bypass Cloudflare, DataDome, PerimeterX, and other bot protections
  • Real browser fingerprint: Appears as a genuine Chrome browser, not headless
  • CDP native: Direct WebSocket connection for Playwright, Puppeteer, or raw CDP
  • Geographic targeting: Spin up sessions in specific countries
  • Persistent profiles: Maintain login state across sessions

Notes

  • Sessions auto-terminate after extended inactivity
  • Always stop sessions when done to avoid unnecessary usage
  • Use profiles when you need to maintain logged-in state
  • SOCKS5 is the only supported proxy type
  • Clawdbot runs scripts from ~/clawd/ - install npm dependencies there
  • For full page scraping, always scroll to trigger lazy-loaded content

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

1password

免费

Set up and use the 1Password command-line tool `op` to sign in, verify account access, and work with vault data. The skill covers single or multiple accounts and shows how to run commands or fill templates with secrets while limiting exposure in logs and files.

中文简介正在准备中。当前显示英语简介。

  • Set up the `op` command-line tool
  • Sign in and verify access to an account
  • Run a command with vault secrets
sundial-org/awesome-openclaw-skills6712026年3月7日 更新

Check live prices, price changes, and trading volume for Shanghai, Shenzhen, and Beijing stocks. Review intraday volume patterns and possible large-investor activity, and manage holdings with cost, quantity, and profit or loss summaries.

中文简介正在准备中。当前显示英语简介。

  • Checking current prices for A-share stocks
  • Reviewing intraday volume and large-investor signals
  • Managing a stock portfolio and checking profit or loss
sundial-org/awesome-openclaw-skills6712026年3月7日 更新

Scan HTML or JSX files and directories for accessibility issues such as missing image descriptions, form labels, and keyboard access problems. The skill identifies WCAG guideline failures and provides suggested code fixes alongside its findings.

中文简介正在准备中。当前显示英语简介。

  • Checking a new component before release
  • Auditing an inherited codebase
  • Preparing for an accessibility compliance review
sundial-org/awesome-openclaw-skills6712026年3月7日 更新

Plan A/B tests that compare page or product changes, with clear hypotheses, sample sizes, success metrics, and traffic allocation. Get a structured test plan and guidance for interpreting results and deciding what to try next.

中文简介正在准备中。当前显示英语简介。

  • Comparing signup button copy
  • Planning a pricing page experiment
  • Estimating sample size and test duration
sundial-org/awesome-openclaw-skills6712026年3月7日 更新

Turn LinkedIn profile URLs into coordinated account-based outreach. The workflow gathers profile details, enriches contacts with email and phone data, looks up mailing addresses, and prepares email, LinkedIn, and handwritten-letter touches with the specified services.

中文简介正在准备中。当前显示英语简介。

  • Building a multichannel campaign from LinkedIn prospect URLs
  • Enriching prospect records with work contact details
  • Coordinating email, LinkedIn, and handwritten mail outreach
sundial-org/awesome-openclaw-skills6712026年3月7日 更新

accli

免费

Work with Apple Calendar on macOS to list calendars, find and view events, and check busy time slots across calendars. Create, update, or delete events with details such as dates, locations, and descriptions.

中文简介正在准备中。当前显示英语简介。

  • Reviewing events on a work or personal calendar
  • Checking availability before scheduling a meeting
  • Creating or updating a calendar event
sundial-org/awesome-openclaw-skills6712026年3月7日 更新

查看 sundial-org 的全部技能

报告此技能的问题