← 返回
未分类

browser-auto-plus

Enhanced browser automation with error recovery, retry logic, multi-browser support, screenshot verification, and integration with web scraping. Supports Chrome, Firefox, Edge with automatic failover.
Enhanced browser automation with error recovery, retry logic, multi-browser support, screenshot verification, and integration with web scraping. Supports Chrome, Firefox, Edge with automatic failover.
yjkj999999
未分类 community v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 13
下载
💾 0
安装
1
版本
#latest

概述

Browser Auto Plus

Enhanced browser automation with error recovery, retry logic, multi-browser support, and screenshot verification.

Features

  • Multi-Browser Support: Chrome, Firefox, Edge with automatic failover
  • Error Recovery: Automatic retry with exponential backoff
  • Screenshot Verification: Visual confirmation after each action
  • Web Scraping Integration: Extract data with CSS/XPath selectors
  • CAPTCHA Handling: Detection and manual/automatic solving
  • Proxy Support: Route through proxies for anonymity

Setup

# Check available browsers
npx playwright install

# Or install specific browser
npx playwright install chromium
npx playwright install firefox
npx playwright install webkit

Commands

# Navigate
browser navigate <url>

# Interact
browser act "<action>"

# Extract data
browser extract "<instruction>" ['{}']

# Discover elements
browser observe "<query>"

# Take screenshot
browser screenshot

# Close browser
browser close

Error Recovery

Retry Logic

// Automatic retry with exponential backoff
const retry = async (fn, maxRetries = 3) => {
  for (let i = 0; i < maxRetries; i++) {
    try {
      return await fn();
    } catch (error) {
      if (i === maxRetries - 1) throw error;
      await new Promise(r => setTimeout(r, Math.pow(2, i) * 1000));
    }
  }
};

Common Errors and Solutions

ErrorSolution
-----------------
Element not foundUse browser observe to discover elements
TimeoutIncrease timeout or use retry logic
CAPTCHA detectedSwitch to manual solving or proxy
Navigation failedCheck URL, network, try different browser
Screenshot failedVerify browser is running

Multi-Browser Support

Browser Selection

# Use specific browser
BROWSER=firefox browser navigate <url>

# Use headless mode
HEADLESS=true browser navigate <url>

# Use proxy
PROXY=http://proxy:port browser navigate <url>

Browser Comparison

FeatureChromeFirefoxEdge
--------------------------------
SpeedFastMediumFast
MemoryHighMediumMedium
StealthMediumHighMedium
ExtensionsYesYesYes
Best forGeneralPrivacyWindows

Screenshot Verification

# Take screenshot after action
browser act "click Sign In"
browser screenshot

# Take screenshot with custom name
browser screenshot --name "after-login"

# Take full page screenshot
browser screenshot --full-page

Web Scraping Integration

Extract with Selectors

# Extract using CSS selector
browser extract "document.querySelectorAll('.product-title')"

# Extract using XPath
browser extract "document.evaluate('//div[@class=\"price\"]', document, null, XPathResult.ANY_TYPE, null)"

# Extract with data transformation
browser extract "
  Array.from(document.querySelectorAll('.item')).map(item => ({
    title: item.querySelector('.title').textContent,
    price: item.querySelector('.price').textContent,
    link: item.querySelector('a').href
  }))
"

Anti-Detection

# Randomize user agent
browser act "set user agent to random"

# Add random delays
browser act "wait 1-3 seconds"

# Randomize viewport
browser act "set viewport to random size"

CAPTCHA Handling

Detection

# Check for CAPTCHA
browser observe "CAPTCHA, reCAPTCHA, hCaptcha, Cloudflare"

# If found, take screenshot for manual solving
browser screenshot --name "captcha"

Solutions

  1. Manual Solving: Take screenshot, solve manually, continue
  2. Proxy Rotation: Switch IP to avoid CAPTCHA
  3. Browser Fingerprint: Use stealth plugins
  4. Rate Limiting: Add delays between requests

Best Practices

  1. Always navigate first before interacting
  2. View screenshots after each command to verify
  3. Be specific in action descriptions
  4. Close browser when done
  5. Use retry logic for flaky operations
  6. Log errors for debugging
  7. Respect robots.txt and rate limits
  8. Use headless mode for automation
  9. Handle errors gracefully with fallbacks
  10. Verify results with screenshots/extraction

Troubleshooting

  • Browser not found: Install with npx playwright install
  • Element not found: Use browser observe to discover elements
  • Timeout: Increase timeout or check network
  • CAPTCHA: Switch browser, use proxy, or solve manually
  • Memory leak: Close browser periodically
  • Detection: Use stealth mode, random delays, proxy

Anti-Detection Techniques

  1. Random Delays: 1-5 second delays between actions
  2. User Agent Rotation: Randomize browser fingerprint
  3. Viewport Randomization: Vary window size
  4. Cookie Management: Handle cookies properly
  5. Proxy Rotation: Change IP periodically
  6. Human-like Behavior: Random mouse movements, scrolling

Integration with Web Scraping

# Full scraping workflow
browser navigate "https://example.com/products"
browser observe ".product-list"
browser extract "
  Array.from(document.querySelectorAll('.product')).map(p => ({
    name: p.querySelector('.name').textContent,
    price: p.querySelector('.price').textContent,
    rating: p.querySelector('.rating').textContent
  }))
"
browser screenshot --name "products"
browser close

版本历史

共 1 个版本

  • v1.0.0 从ClawHub迁移发布 当前
    2026-06-07 12:37 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

design-media

agnes-image-gen

user_15292d5a
使用 Agnes AI 的图片生成模型生成图片,支持文生图(agnes-image-2.1-flash)和图生图(agnes-image-2.0-flash)。支持自定义 API Key,用户可使用自己的 Agnes Key。优化重点:降低
★ 1 📥 243
dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 687 📥 331,366
dev-programming

YouTube

byungkyu
使用托管OAuth集成YouTube Data API,支持搜索视频、管理播放列表、获取频道数据及评论互动,适用于用户需要时使用此技能。
★ 142 📥 42,159