engines

package
v0.0.0-...-983b8d8 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandomUA

func RandomUA(config *BrowserConfig) string

RandomUserAgent generates a random browser user agent on every request

Types

type BrowserConfig

type BrowserConfig struct {
	// contains filtered or unexported fields
}

type Result

type Result struct {
	Title       string
	Link        string
	Description string
}

func Combined

func Combined(query string, options *SearchOptions, engines ...SearchEngine) []Result

type SearchEngine

type SearchEngine struct {
	SearchUrl  func(query string, options *SearchOptions) string
	Url        func(path string, lang string) string
	Result     func(e *colly.HTMLElement) Result
	Pagination func(page int, options *SearchOptions, e *colly.HTMLElement) string
	// contains filtered or unexported fields
}

func DuckDuckGo

func DuckDuckGo() SearchEngine

func Ecosia

func Ecosia() SearchEngine

func Google

func Google() SearchEngine
func Naver() SearchEngine

todo fix

func Startpage

func Startpage() SearchEngine

func Yahoo

func Yahoo() SearchEngine

func (*SearchEngine) Crawl

func (en *SearchEngine) Crawl(query string, options *SearchOptions) []Result

type SearchOptions

type SearchOptions struct {
	Lang      string
	Pages     int
	From      *time.Time
	To        *time.Time
	Timerange string
	UserAgent string
	Verbose   bool
}

Jump to

Keyboard shortcuts

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