crawler

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: GPL-3.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crawler

type Crawler struct {
	UserAgent string
	// contains filtered or unexported fields
}

func New

func New(logger *zap.Logger) *Crawler

func (*Crawler) Close

func (c *Crawler) Close()

func (*Crawler) Detect

func (c *Crawler) Detect() error

func (*Crawler) FromAuto

func (c *Crawler) FromAuto(useCycleTLS bool) error

func (*Crawler) FromFile

func (c *Crawler) FromFile() error

func (*Crawler) FromHTTP

func (c *Crawler) FromHTTP() error

func (*Crawler) FromHTTPCycleTLS added in v1.0.1

func (c *Crawler) FromHTTPCycleTLS() error

func (*Crawler) FromStdin added in v1.0.1

func (c *Crawler) FromStdin() error

func (*Crawler) GetContentType

func (c *Crawler) GetContentType() string
func (c *Crawler) GetFeedLink() (string, string, error)

func (*Crawler) GetFeedLinkFromHTML

func (c *Crawler) GetFeedLinkFromHTML() (string, string, error)

func (*Crawler) GetReadable

func (c *Crawler) GetReadable(useCycleTLS bool) (ItemCrawled, error)

func (*Crawler) GetSource added in v1.0.1

func (c *Crawler) GetSource() io.ReadCloser

func (*Crawler) ParseFeed

func (c *Crawler) ParseFeed() (*gofeed.Feed, error)

func (*Crawler) Reset

func (c *Crawler) Reset()

func (*Crawler) SetBasicAuth

func (c *Crawler) SetBasicAuth(username string, password string)

func (*Crawler) SetLocation

func (c *Crawler) SetLocation(sourceLocation string) error

type ItemCrawled

type ItemCrawled struct {
	Title       string
	Author      string
	Excerpt     string
	SiteName    string
	Image       string
	ContentHtml string
	ContentText string
}

Jump to

Keyboard shortcuts

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