parser

package
Version: v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseParser

type BaseParser struct {
	Parser          *goquery.Selection
	ParseArea       string
	URL             string
	ResponseCode    int
	ResponseMessage error
	Config          config.Config
	RedisKey        string
}

BaseParser is the base parser for all parsers in go-malscarper.

func (*BaseParser) InitParser

func (base *BaseParser) InitParser(url string, parseArea string) error

InitParser to initiate base fields.

func (*BaseParser) Log added in v0.3.0

func (base *BaseParser) Log(logType string, text ...string)

Log is wrapper mallogger logging for easier call.

func (*BaseParser) SetResponse added in v0.2.0

func (base *BaseParser) SetResponse(code int, message string)

SetResponse to set response code and message.

Source Files

Jump to

Keyboard shortcuts

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