v0.3.3

pardnchiu/go-browser

Last updated

NoteThis README was generated by SKILL, get the ZH version from here.



EXTRACT WEB CONTENT VIA CHROME — MARKDOWN OR HTML, READY FOR AGENTS


Go ReferenceReleaseLicense




A Go web content extraction library with JavaScript-rendered page scraping, HTML to Markdown for LLMs, and Chrome cookie sessions

Table of Contents



Features


go get github.com/pardnchiu/go-browser/core · Documentation

  • Chrome Content Extraction — Renders pages with local Chrome or Chromium and returns Markdown, merged HTML, or a JSON node tree, passing JSON and XML responses through untouched.
  • Multi-Snapshot Merge — Scrolls and captures a snapshot per step, then merges and deduplicates them to recover lazy-loaded and infinite-scroll content.
  • Chrome Cookie Sessions — Decrypts cookies from the local Chrome profile and injects them into a temporary browser to read login-required pages.
  • Attempt Cookie Consent Dismissal — Runs up to two passes to close consent banners and reports the outcome in Consent, without promising success on every site.
  • Headless-First Isolation — Isolates browser instances by headless mode and User-Agent, retrying headed only on 403, 429, or 503 blocks when a display exists.

Architecture


Full Architecture

graph TB
    A[Fetch] --> B{Route}
    B -->|Headless first| C[Cached Browser]
    B -->|SameSession| D[Cookie Temp Profile]
    C --> E[Navigate + Consent]
    D --> E
    E --> F[Scroll + Snapshots]
    F --> G[Merge + Readability]
    G --> H[Markdown / HTML / JSON]
  1. graph TB
  2. A[Fetch] --> B{Route}
  3. B -->|Headless first| C[Cached Browser]
  4. B -->|SameSession| D[Cookie Temp Profile]
  5. C --> E[Navigate + Consent]
  6. D --> E
  7. E --> F[Scroll + Snapshots]
  8. F --> G[Merge + Readability]
  9. G --> H[Markdown / HTML / JSON]

License


This project is licensed under the MIT LICENSE.

Author


Just open an issue to share an idea.
go-browser contributors


©️ 2026 邱敬幃 Pardn Chiu
中文