scraper

package
v0.0.0-...-7438f17 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2020 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 DrakmaClient

type DrakmaClient struct {
	BaseUrl  string
	ApiToken string
}

func (*DrakmaClient) Do

func (d *DrakmaClient) Do(req *http.Request) (*http.Response, error)

func (*DrakmaClient) NewRequest

func (d *DrakmaClient) NewRequest(method, url string, body io.Reader) (*http.Request, error)

func (*DrakmaClient) Post

func (d *DrakmaClient) Post(endpoint, data string) (*http.Response, error)

type Scraper

type Scraper struct {
	SeleniumService *selenium.Service
	SeleniumDriver  selenium.WebDriver
	Err             error
}

func (*Scraper) Click

func (s *Scraper) Click(selector string)

func (*Scraper) Hover

func (s *Scraper) Hover(selector string)

func (*Scraper) StartDriver

func (s *Scraper) StartDriver(scraperOptions ScraperOptions) error

func (*Scraper) StartService

func (s *Scraper) StartService(scraperOptions ScraperOptions) error

func (*Scraper) StopDriver

func (s *Scraper) StopDriver()

func (*Scraper) StopService

func (s *Scraper) StopService()

func (*Scraper) Text

func (s *Scraper) Text(selector string) (string, error)

func (*Scraper) Type

func (s *Scraper) Type(selector, text string)

func (*Scraper) Visit

func (s *Scraper) Visit(url string)

func (*Scraper) WaitForElement

func (s *Scraper) WaitForElement(selector string)

func (*Scraper) WaitForElementE

func (s *Scraper) WaitForElementE(selector string) error

type ScraperOptions

type ScraperOptions struct {
	Port            int
	Headless        bool
	SeleniumPath    string
	GeckoDriverPath string
	DrakmaUrl       string
	DrakmaAccount   string
	DrakmaToken     string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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