crawler

package
v0.0.0-...-fef445f Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article struct {
	URL         string
	Header      string
	Content     string
	Author      string
	IsSponsored bool
}

type Crawler

type Crawler struct {
	Retries         int
	RetriesInterval time.Duration
	URL             string
	// contains filtered or unexported fields
}

func New

func New(timeout time.Duration, retries int) *Crawler

func (*Crawler) ParseArticles

func (c *Crawler) ParseArticles() ([]Article, error)

Fetches and parses the articles

Articles is contained in tables with class 'el-item item '. They have same structure regardless of content table > tbody > tr > td > (content)

Jump to

Keyboard shortcuts

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