scraper

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsScrapeError

func IsScrapeError(err error) bool

Types

type ScrapeError

type ScrapeError struct {
	Message string
}

func (ScrapeError) Error

func (e ScrapeError) Error() string

type ScrapedArticle

type ScrapedArticle struct {
	Title         string
	URL           string
	PublishedDate *time.Time
}

type Scraper

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

Scraper scrapes HTML pages for article links.

func NewScraper

func NewScraper(client *http.Client) *Scraper

NewScraper creates a Scraper with the given HTTP client.

func (*Scraper) ScrapeBlog

func (s *Scraper) ScrapeBlog(ctx context.Context, blogURL string, selector string) ([]ScrapedArticle, error)

Jump to

Keyboard shortcuts

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