Releases: BugraAkdemir/gosearch
Releases · BugraAkdemir/gosearch
Release list
v0.2.0 — Bing engine + quality package
Immutable
release. Only release title and notes can be modified.
Fully backward-compatible minor release.
New engine
- Bing provider — parses
li.b_algoresults and unwraps/ck/aclick-tracker links (u=a1<base64url>param, else best-effort reconstruction from the visible cite). Bing served clean organic results even to a flagged datacenter IP, making it the most automation-tolerant engine after DuckDuckGo and a strong fallback candidate.
Quality package
- Canonical URL dedup across all providers — percent-encoding, parameter order, host case, fragments, default ports, and Unicode simple case fold into one comparison key;
Result.URLkeeps the original spelling. Fixes live-observed duplicates like?il=Istanbulvs?il=%C4%B0stanbul. WithMarkdown()—Fetchrenders extracted content as GitHub-flavored Markdown (headings, lists, fenced code, links, emphasis preserved). Built for LLM context; default plain-text output unchanged.WithDates()— opt-inResult.Datefreshness stamps from engine metadata.WithBlockedDomains()/WithAllowedDomains()— caller-side result filtering by host or subdomain.
Fixed
- readability no longer removes
<html>/<body>when feature-flag classes contain noise-marker substrings (found live on en.wikipedia.org; previously erased page content entirely).
Docs
- Professional README overhaul with LLM-agent pipeline guidance and expanded recipes.
v0.1.0 — first release
Immutable
release. Only release title and notes can be modified.
First tagged release of gosearch.
Zero-API-key web search for local-first Go programs: Search() queries Google, Yandex, or DuckDuckGo by fetching and parsing each engine's public HTML result page; Fetch() extracts the readable main content of any URL. The only third-party dependency is golang.org/x/net/html.
go get github.com/BugraAkdemir/gosearch@v0.1.0Highlights
- Three engines, one interface — ordered fallback via
WithFallback(...); advances only onErrBlocked/ErrChallenge, never on a valid empty result. - Honest anti-bot handling — realistic browser headers, cookie jar, per-host rate limiting, and block detection (
ErrBlocked/ErrChallenge); no CAPTCHA solving, JS-challenge execution, or proxy rotation — ever. - Retries where they help — transient failures (network errors, HTTP 408/5xx) retried with exponential backoff (
WithRetries(n), default 2). - Readable content extraction —
Fetch()returns title + main text with nav/ads/footer stripped.
Reliability, honestly
- DuckDuckGo — validated against a real captured success page; most reliable of the three.
- Google / Yandex — best-effort heuristics against documented markup, tested offline on synthetic + real block fixtures; these engines serve result pages only to clients they trust, so reliability is IP-reputation dependent.
Notes
- Tests are offline and deterministic;
go test ./...never contacts the live engines. - CI runs build, vet, gofmt, golangci-lint, and
go test -raceon every push.