# pardnchiu/go-browser > go-browser by 邱敬幃 Pardn Chiu (pardnchiu) is a Go library that extracts web content through local Chrome as Markdown, HTML, or a JSON node tree. Maintained by 邱敬幃 Pardn Chiu (pardnchiu), Pardn Co., LTD, Taiwan · Infrastructure Engineering. Source: https://github.com/pardnchiu/go-browser Full text in one file: [English](https://go-browser.pardn.io/llms-full.txt) · [中文](https://go-browser.pardn.io/zh/llms-full.txt) ## Overview - [Home](https://go-browser.pardn.io/index.md): go-browser by 邱敬幃 Pardn Chiu (pardnchiu) is a Go library that extracts web content through local Chrome as Markdown, HTML, or a JSON node tree. - [Getting Started](https://go-browser.pardn.io/getting-started.md): Install go-browser with go get, check the Chrome and sqlite3 prerequisites, run a first Fetch call that returns Markdown, and close cached browsers. - [Troubleshooting](https://go-browser.pardn.io/getting-started-troubleshooting.md): What each go-browser error means: http 403, 429, 503, 404 and 204 status errors, invalid url, readability failures, and SameSession keychain errors. ## Concepts - [Architecture](https://go-browser.pardn.io/architecture.md): How go-browser is layered: fetch routing, the keyed browser launcher, Chrome cookie decryption, and the snapshot-to-Markdown content pipeline. - [Core Concepts](https://go-browser.pardn.io/core-concepts.md): The eleven ordered steps of one go-browser Fetch call, from URL validation and routing through settling, consent and scrolling to output conversion. ## Fetch Flow - [Fetch Routing](https://go-browser.pardn.io/core-concepts-routing.md): How go-browser picks headless or headed Chrome, retries headed only on 403, 429 or 503, and sends social session domains straight to a headed browser. - [Browser Cache](https://go-browser.pardn.io/core-concepts-browser-cache.md): How go-browser caches Chrome by headless mode and User-Agent, evicts idle instances after five minutes, and caps concurrent pages with SetMaxConcurrency. - [Cookie Sessions](https://go-browser.pardn.io/core-concepts-cookie-session.md): How SameSession copies your Chrome cookie database, decrypts v10 cookies with PBKDF2 and AES-128-CBC, and injects them into a throwaway browser. - [Page Loading](https://go-browser.pardn.io/core-concepts-snapshots.md): How go-browser decides a page has loaded with DOM stability and requestIdleCallback, then scrolls and captures snapshots of lazily loaded content. - [Consent Banners](https://go-browser.pardn.io/core-concepts-consent.md): How go-browser dismisses cookie consent banners via known platform selectors, accept text or overlay removal, while leaving login walls and paywalls alone. - [Anti-Detection](https://go-browser.pardn.io/core-concepts-anti-detection.md): The anti-detection measures in go-browser: AutomationControlled disabled, stealth.js navigator patches, paced scrolling, and the headed fallback. ## Configuration - [Option Fields](https://go-browser.pardn.io/configuration.md): Every go-browser Option field with its default: IdleWait, MaxLength, UserAgent, KeepLinks, Viewport, SameSession, Headless, Profile, Type and ScrollCount. - [Output Formats](https://go-browser.pardn.io/configuration-output-formats.md): What go-browser returns for TypeMarkdown, TypeHTML and TypeJSON, which Result fields each fills, and how JSON and XML documents bypass conversion. - [Environment](https://go-browser.pardn.io/configuration-environment.md): Host settings go-browser reads: DISPLAY and WAYLAND_DISPLAY, Chrome binary lookup order, Chrome profile paths, and commands used by SameSession. ## Reference - [API Reference](https://go-browser.pardn.io/api-reference.md): go-browser API reference for Fetch, Close and SetMaxConcurrency, with parameters, retry behavior and an index of every exported symbol. - [Content Conversion](https://go-browser.pardn.io/api-reference-conversion.md): HTMLToMarkdown, HTMLToNode, Merge, DedupTree, DedupMarkdownParagraphs and InlineTimeElements: element rules, deduplication and edge cases. - [Types](https://go-browser.pardn.io/api-reference-types.md): The Option, Viewport, Result, Error, Node and Browser types in go-browser, the TypeMarkdown, TypeHTML and TypeJSON constants, and ErrProfileNotFound. - [Removed API](https://go-browser.pardn.io/removed-api.md): Symbols removed from go-browser: the tab API removed in v0.3.2, the goBrowser to browser rename, and the v0.2.0 move to the core package. ## Symbols Exported symbol -> page that documents it. - `Browser` (core): [API Reference](https://go-browser.pardn.io/api-reference.md) - `Close` (core): [API Reference](https://go-browser.pardn.io/api-reference.md), [Architecture](https://go-browser.pardn.io/architecture.md) - `DedupMarkdownParagraphs` (core): [API Reference](https://go-browser.pardn.io/api-reference.md), [Architecture](https://go-browser.pardn.io/architecture.md) - `DedupTree` (core): [Content Conversion](https://go-browser.pardn.io/api-reference-conversion.md), [Architecture](https://go-browser.pardn.io/architecture.md) - `DefaultUserAgent` (core): [API Reference](https://go-browser.pardn.io/api-reference.md), [Architecture](https://go-browser.pardn.io/architecture.md) - `Error` (core): [API Reference](https://go-browser.pardn.io/api-reference.md), [Troubleshooting](https://go-browser.pardn.io/getting-started-troubleshooting.md) - `ErrProfileNotFound` (core): [API Reference](https://go-browser.pardn.io/api-reference.md), [Architecture](https://go-browser.pardn.io/architecture.md) - `Fetch` (core): [API Reference](https://go-browser.pardn.io/api-reference.md), [Troubleshooting](https://go-browser.pardn.io/getting-started-troubleshooting.md) - `HTMLToMarkdown` (core): [API Reference](https://go-browser.pardn.io/api-reference.md), [Architecture](https://go-browser.pardn.io/architecture.md) - `HTMLToNode` (core): [API Reference](https://go-browser.pardn.io/api-reference.md), [Architecture](https://go-browser.pardn.io/architecture.md) - `InlineTimeElements` (core): [API Reference](https://go-browser.pardn.io/api-reference.md), [Output Formats](https://go-browser.pardn.io/configuration-output-formats.md) - `Merge` (core): [API Reference](https://go-browser.pardn.io/api-reference.md), [Architecture](https://go-browser.pardn.io/architecture.md) - `Node` (core): [API Reference](https://go-browser.pardn.io/api-reference.md), [Output Formats](https://go-browser.pardn.io/configuration-output-formats.md) - `Option` (core): [API Reference](https://go-browser.pardn.io/api-reference.md), [Core Concepts](https://go-browser.pardn.io/core-concepts.md) - `Result` (core): [API Reference](https://go-browser.pardn.io/api-reference.md), [Output Formats](https://go-browser.pardn.io/configuration-output-formats.md) - `SetMaxConcurrency` (core): [API Reference](https://go-browser.pardn.io/api-reference.md), [Architecture](https://go-browser.pardn.io/architecture.md) - `TypeHTML` (core): [API Reference](https://go-browser.pardn.io/api-reference.md), [Option Fields](https://go-browser.pardn.io/configuration.md) - `TypeJSON` (core): [Types](https://go-browser.pardn.io/api-reference-types.md), [Option Fields](https://go-browser.pardn.io/configuration.md) - `TypeMarkdown` (core): [Types](https://go-browser.pardn.io/api-reference-types.md), [Option Fields](https://go-browser.pardn.io/configuration.md) - `Viewport` (core): [API Reference](https://go-browser.pardn.io/api-reference.md), [Option Fields](https://go-browser.pardn.io/configuration.md) ## 中文文件 - [首頁](https://go-browser.pardn.io/zh/index.md): 邱敬幃 Pardn Chiu(pardnchiu)的 Go 網頁抓取函式庫,透過本機 Chrome 擷取內容並輸出 Markdown、HTML 或 JSON。 - [快速開始](https://go-browser.pardn.io/zh/getting-started.md): 以 go get 安裝 go-browser、確認 Chrome 前置需求、第一次 Fetch 取得 Markdown 並關閉瀏覽器。 - [疑難排解](https://go-browser.pardn.io/zh/getting-started-troubleshooting.md): go-browser 錯誤對照:http 403/429/503/404/204、invalid url、readability 與鑰匙圈錯誤。 - [架構](https://go-browser.pardn.io/zh/architecture.md): go-browser 分層:Fetch 路由、瀏覽器啟動器、Chrome Cookie 解密與快照轉 Markdown 管線。 - [核心概念](https://go-browser.pardn.io/zh/core-concepts.md): 一次 Fetch 依序執行的十一個步驟:驗證、路由、等待穩定、同意橫幅、捲動與輸出轉換。 - [Fetch 路由](https://go-browser.pardn.io/zh/core-concepts-routing.md): go-browser 如何選擇 headless 或有頭 Chrome,僅在 403/429/503 時以有頭重試一次。 - [瀏覽器快取](https://go-browser.pardn.io/zh/core-concepts-browser-cache.md): 以 headless 與 User-Agent 快取 Chrome、閒置 5 分鐘回收,並以 SetMaxConcurrency 限制併發。 - [登入 Cookie](https://go-browser.pardn.io/zh/core-concepts-cookie-session.md): SameSession 複製並解密本機 Chrome Cookie(PBKDF2+AES-128-CBC),注入一次性瀏覽器讀取登入頁。 - [頁面載入](https://go-browser.pardn.io/zh/core-concepts-snapshots.md): 以 DOM 穩定與 requestIdleCallback 判定載入完成,再捲動擷取延遲載入內容的多份快照。 - [同意橫幅](https://go-browser.pardn.io/zh/core-concepts-consent.md): 以已知平台選擇器、同意字樣或移除遮罩關閉 Cookie 同意橫幅,不碰登入牆與付費牆。 - [反偵測](https://go-browser.pardn.io/zh/core-concepts-anti-detection.md): go-browser 反偵測:停用 AutomationControlled、stealth.js 修改 navigator、擬人化捲動與有頭降級。 - [Option 欄位](https://go-browser.pardn.io/zh/configuration.md): go-browser Option 各欄位與預設值:IdleWait、MaxLength、KeepLinks、Viewport、Type 等。 - [輸出格式](https://go-browser.pardn.io/zh/configuration-output-formats.md): TypeMarkdown、TypeHTML、TypeJSON 的回傳內容與填入欄位,以及 JSON/XML 文件的直通路徑。 - [執行環境](https://go-browser.pardn.io/zh/configuration-environment.md): go-browser 讀取的主機設定:DISPLAY、Chrome 執行檔與設定檔路徑、SameSession 外部指令。 - [API 參考](https://go-browser.pardn.io/zh/api-reference.md): go-browser 的 Fetch、Close、SetMaxConcurrency 參數與重試行為,以及全部匯出符號索引。 - [內容轉換](https://go-browser.pardn.io/zh/api-reference-conversion.md): HTMLToMarkdown、HTMLToNode、Merge、DedupTree 等六個轉換函式的規則、去重與邊界。 - [型別](https://go-browser.pardn.io/zh/api-reference-types.md): go-browser 的 Option、Result、Error、Node 等型別,輸出格式常數與 ErrProfileNotFound。 - [已移除 API](https://go-browser.pardn.io/zh/removed-api.md): go-browser 已移除符號:v0.3.2 的分頁 API、goBrowser 更名 browser、v0.2.0 搬到 core。 ## Optional - [Release Notes](https://go-browser.pardn.io/released/index.md): pardnchiu/go-browser changelog by version