v0.3.2 Release Notes
v0.3.1 -> v0.3.2
Summary
Narrows the library to one-shot browser content extraction with optional markup formats. Drops the interactive tab surface and renames the package. Fetch also attempts cookie-consent dismissal.
翻譯
將函式庫收斂為單次瀏覽器內容萃取,可選標記格式輸出。移除互動式分頁介面並更名套件。擷取時也會嘗試關閉 cookie 同意橫幅。
⚠️ Breaking Changes
Package renamed: goBrowser → browser
Before:
import goBrowser "github.com/pardnchiu/go-browser/core"
goBrowser.Fetch(ctx, href, timeout, opt)
After:
import "github.com/pardnchiu/go-browser/core"
browser.Fetch(ctx, href, timeout, opt)
Migration:
// Old
import goBrowser "github.com/pardnchiu/go-browser/core"
result, err := goBrowser.Fetch(ctx, href, timeout, opt)
// New — module path unchanged; only the Go package name changes
import "github.com/pardnchiu/go-browser/core"
result, err := browser.Fetch(ctx, href, timeout, opt)
翻譯
套件名稱由 goBrowser 更名為 browser。module path 不變,請更新 import 別名與所有 goBrowser. 前綴呼叫。
Interactive tab API removed
Before:
id, err := goBrowser.CreateTab(ctx, href, opt)
_ = goBrowser.TabClick(id, selector)
_ = goBrowser.TabType(id, selector, text)
_ = goBrowser.TabScroll(id, count)
_ = goBrowser.TabNavigate(id, href)
jsResult, err := goBrowser.TabEval(id, js)
snap, err := goBrowser.TabSnapshot(id)
_ = goBrowser.CloseTab(id)
After:
These symbols no longer exist. The library only exposes one-shot Fetch (plus markdown helpers). Full CDP / interactive control belongs outside this package (for example Playwright MCP).
Migration:
// Old — multi-step tab session
id, _ := goBrowser.CreateTab(ctx, href, opt)
_ = goBrowser.TabClick(id, "#btn")
snap, _ := goBrowser.TabSnapshot(id)
_ = goBrowser.CloseTab(id)
// New — one-shot extraction only
result, err := browser.Fetch(ctx, href, timeout, &browser.Option{
// Headless, SameSession, Profile, ...
})
// Use result.Content / result.Markdown / result.Tree
// For click/type/eval workflows, switch to a full CDP client (e.g. Playwright MCP)
Removed exports: CreateTab, CloseTab, TabSnapshot, TabClick, TabType, TabScroll, TabNavigate, TabEval, plus the shared interactive browser session cleaned up inside Close().
翻譯
互動式分頁 API 與共用瀏覽器工作階段已移除。此套件僅保留單次 Fetch 內容萃取;需要完整 CDP/點擊輸入等互動請改用外部工具(例如 Playwright MCP)。
Changes
FEAT
- Attempt cookie consent banner dismissal during page fetch; expose outcome on
Result.Consent(@pardnchiu) [a17d868]
翻譯
- 擷取頁面時自動嘗試關閉 cookie 同意橫幅,並於
Result.Consent回報結果
FIX
- Isolate browsers by headless mode and User-Agent; fall back to headed only when the response is blocked (@pardnchiu) [47c9003]
翻譯
- 依 headless 與 User-Agent 隔離瀏覽器實例,並僅在被擋時才改用 headed
BREAKING
- Remove interactive tab API and shared browser session (@pardnchiu) [de505f2]
- Rename package
goBrowsertobrowser(@pardnchiu) [35d3342]
翻譯
- 移除互動式分頁 API 與共用瀏覽器工作階段
- 將套件名稱由
goBrowser更名為browser
DOC
- Rewrite docs for Chrome content extraction focus and the package rename (@pardnchiu) [cd316a8]
翻譯
- 重寫文件以對齊 Chrome 內容萃取主軸與套件更名
REMOVE
- Drop
core/fetch_test.gowith the interactive tab coverage (@pardnchiu) [de505f2]
翻譯
- 隨互動分頁移除一併刪除
core/fetch_test.go
Scope
core/browser.go— REMOVE, BREAKINGcore/fetch.go— FEAT, FIX, BREAKINGcore/embed/consent.js— FEATcore/launcher.go— FIX, BREAKINGcore/cookie.go,core/cookieOther.go,core/markdown.go— BREAKINGcore/fetch_test.go— REMOVEREADME.md,doc/— DOC
Generated by SKILL