scraper

package
v0.0.0-...-fe6eb44 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchHTML

func FetchHTML(URL string) (io.ReadCloser, error)

Types

type ActionType

type ActionType uint32
const (
	SCRAPE ActionType = iota
	ADVANCE
)

type Scraper

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

func NewScraper

func NewScraper(body io.ReadCloser) *Scraper

func (*Scraper) Advance

func (s *Scraper) Advance(startTag, class string, count int) error

func (*Scraper) Close

func (s *Scraper) Close()

func (*Scraper) Errorf

func (s *Scraper) Errorf(format string, a ...any) error
func (s *Scraper) ScrapeLinks(startTag, class string, count int) ([]string, error)

func (*Scraper) ScrapeText

func (s *Scraper) ScrapeText(startTag, class string, count int) ([]string, error)

func (*Scraper) TryScrapeText

func (s *Scraper) TryScrapeText() (string, bool)

Jump to

Keyboard shortcuts

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