fulltext

package
v0.4.17 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUserAgent

func GetUserAgent() (string, error)

get user agent returns a valid user agent for use in scraping. in the future the idea is to have it generated at runtime, either by reading from local data or calling a remote api. thus the error return value.

Types

type Scraper

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

func NewScraper

func NewScraper() *Scraper

func (*Scraper) ScrapeUrls

func (s *Scraper) ScrapeUrls(urls ...string) (map[string]WebPage, error)

func (*Scraper) UnredirectUrl

func (s *Scraper) UnredirectUrl(url string) (u string, redirected bool)

type WebPage

type WebPage struct {
	Url        string
	Body       []byte
	Redirected bool
	StatusCode int
}

Jump to

Keyboard shortcuts

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