crawler

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2022 License: GPL-3.0 Imports: 14 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() error

func (*Crawler) FromFile

func (c *Crawler) FromFile() error

func (*Crawler) FromHTTP

func (c *Crawler) FromHTTP() 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() (ItemCrawled, error)

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