跳到主要内容
知仓学习社ZHICANG

go-rod-master

Comprehensive guide for browser automation and web scraping with go-rod (Chrome DevTools Protocol) including stealth anti-bot-detection patterns.

不碰外部(只输出文字)无严重或高危命中sickn33/agentic-awesome-skills

它会碰到什么

扫了多少3 个文本文件,24 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

Go-Rod Browser Automation Master

Detailed Guide

Read [the detailed guide](references/detailed-guide.md) before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.

When to Use This Skill

  • Use when the user asks to scrape, automate, or test a website using Go.
  • Use when the user needs a headless browser for dynamic/SPA content (React, Vue, Angular).
  • Use when the user mentions stealth, anti-bot, avoiding detection, Cloudflare, or bot detection bypass.
  • Use when the user wants to work with the Chrome DevTools Protocol (CDP) directly from Go.
  • Use when the user needs to intercept or hijack network requests in a browser context.
  • Use when the user asks about concurrent browser scraping or page pooling in Go.
  • Use when the user is migrating from chromedp or Playwright Go and wants a simpler API.

Safety & Risk

Risk Level: 🔵 Safe

  • Read-Only by Default: Default behavior is navigating and reading page content (scraping/testing).
  • Isolated Contexts: Browser contexts are sandboxed; cookies and storage do not persist unless explicitly saved.
  • Resource Cleanup: Designed around Go's defer pattern — browsers and pages close automatically.
  • No External Mutations: Does not modify external state unless the script explicitly submits forms or POSTs data.

Examples

See the examples/ directory for complete, runnable Go files:

  • examples/basic_scrape.go — Minimal scraping example
  • examples/stealth_page.go — Anti-detection with go-rod/stealth
  • examples/request_hijacking.go — Intercepting and modifying network requests
  • examples/concurrent_pages.go — Page pool for concurrent scraping

Limitations

  • CAPTCHAs: Rod does not include CAPTCHA solving. External services (2captcha, etc.) must be integrated separately.
  • Extreme Anti-Bot: While go-rod/stealth handles common detection (WebDriver, plugin fingerprints, WebGL), extremely strict systems (some Cloudflare configurations, Akamai Bot Manager) may still detect automation. Additional measures (residential proxies, human-like behavioral patterns) may be needed.
  • DRM Content: Cannot interact with DRM-protected media (e.g., Widevine).
  • Resource Usage: Each browser instance consumes significant RAM (~100-300MB+). Use PagePool and limit concurrency on memory-constrained systems.
  • Extensions in Headless: Chrome extensions do not work in headless mode. Use Headless(false) with XVFB for server environments.
  • Platform: Requires a Chromium-compatible browser. Does not support Firefox or Safari.

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

同名技能的其他版本

有 3 个不同仓库或目录里都有叫 go-rod-master 的技能。它们内容并不相同,别混用: