parser

package
v0.0.0-...-cbaa3f3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Opts

type Opts struct {
	Db    *gorp.DbMap
	Delay int64
}

type Parser

type Parser struct {
	Id        int64
	Name      string
	Index     string //web address with links
	Type      string //i.e., "news" "article" "video" "photo
	LastVisit int64
	Rules     string //dom selectors in json i.e., {"date":"article.date"}

	Created int64
	Updated int64
	Deleted int64
	Version int64
}

type Prsr

type Prsr struct {
	Opts Opts
}

func NewParser

func NewParser(opts Opts) *Prsr

func (*Prsr) CreateParser

func (p *Prsr) CreateParser(prs *Parser) error

func (*Prsr) GetAll

func (p *Prsr) GetAll(pagetype string) ([]Parser, error)

func (*Prsr) ParseAll

func (p *Prsr) ParseAll(pagetype string) (res map[string]map[string][]string)

Jump to

Keyboard shortcuts

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