article

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2026 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultHTTPClient

func NewDefaultHTTPClient() *http.Client

NewDefaultHTTPClient centralizes network timeouts to keep article retrieval predictable under unreliable blog hosts.

Types

type Content

type Content struct {
	Title string
	Text  string
	URL   string
}

Content is the normalized article payload consumed by the narration pipeline.

type Fetcher

type Fetcher struct {
	// contains filtered or unexported fields
}

Fetcher extracts readable article content from public URLs so the CLI can focus on narration instead of DOM parsing details.

func NewFetcher

func NewFetcher(client *http.Client) *Fetcher

NewFetcher keeps transport configuration injectable for deterministic tests.

func (*Fetcher) Fetch

func (f *Fetcher) Fetch(ctx context.Context, rawURL string) (Content, error)

Fetch downloads a page and extracts a readable title/body pair suitable for TTS conversion.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL