chrome

package
v2.2.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2020 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBrowser

func NewBrowser(ctx context.Context, extra ...chromedp.Option) (*chromedp.CDP, error)

NewBrowser 创建chrome实例 chromedp内部有自己的超时设置,你也可以通过ctx来设置更短的超时

func NewHeadless

func NewHeadless(ctx context.Context, starturl string, extra ...runner.CommandLineOption) (*chromedp.CDP, error)

NewHeadless 创建headless chrome实例 chromedp内部有自己的超时设置,你也可以通过ctx来设置更短的超时

Types

type Chrome

type Chrome struct {
	Browser *cr.Browser
	*collector.Base
	StartURL string
}

func New

func New() *Chrome

func (*Chrome) Close

func (s *Chrome) Close() error

func (*Chrome) Description

func (s *Chrome) Description() string

func (*Chrome) Do

func (s *Chrome) Do(pageURL string, data echo.Store) ([]byte, error)

func (*Chrome) Name

func (s *Chrome) Name() string

func (*Chrome) Start

func (s *Chrome) Start(opt echo.Store) (err error)

Jump to

Keyboard shortcuts

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