http

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const DriverName = "http"

Variables

This section is empty.

Functions

func NewHTMLDocument

func NewHTMLDocument(
	node *goquery.Document,
	url string,
	cookies []drivers.HTTPCookie,
) (drivers.HTMLDocument, error)

func NewHTMLElement

func NewHTMLElement(node *goquery.Selection) (drivers.HTMLElement, error)

Types

type Driver

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

func NewDriver

func NewDriver(opts ...Option) *Driver

func (*Driver) Close

func (drv *Driver) Close() error

func (*Driver) LoadDocument added in v0.7.0

func (drv *Driver) LoadDocument(ctx context.Context, params drivers.LoadDocumentParams) (drivers.HTMLDocument, error)

func (*Driver) Name added in v0.7.0

func (drv *Driver) Name() string

func (*Driver) ParseDocument

func (drv *Driver) ParseDocument(_ context.Context, str values.String) (drivers.HTMLDocument, error)

type HTMLDocument

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

func (*HTMLDocument) CaptureScreenshot added in v0.7.0

func (doc *HTMLDocument) CaptureScreenshot(_ context.Context, _ drivers.ScreenshotParams) (values.Binary, error)

func (*HTMLDocument) ClickBySelector added in v0.7.0

func (doc *HTMLDocument) ClickBySelector(_ context.Context, _ values.String) (values.Boolean, error)

func (*HTMLDocument) ClickBySelectorAll added in v0.7.0

func (doc *HTMLDocument) ClickBySelectorAll(_ context.Context, _ values.String) (values.Boolean, error)

func (*HTMLDocument) Clone added in v0.7.0

func (doc *HTMLDocument) Clone() core.Value

func (*HTMLDocument) Close added in v0.7.0

func (doc *HTMLDocument) Close() error

func (*HTMLDocument) Compare

func (doc *HTMLDocument) Compare(other core.Value) int64

func (*HTMLDocument) Copy added in v0.7.0

func (doc *HTMLDocument) Copy() core.Value

func (*HTMLDocument) CountBySelector added in v0.7.0

func (doc *HTMLDocument) CountBySelector(ctx context.Context, selector values.String) values.Int

func (*HTMLDocument) DeleteCookies added in v0.7.0

func (doc *HTMLDocument) DeleteCookies(_ context.Context, _ ...drivers.HTTPCookie) error

func (*HTMLDocument) DocumentElement added in v0.7.0

func (doc *HTMLDocument) DocumentElement() drivers.HTMLElement

func (*HTMLDocument) ExistsBySelector added in v0.7.0

func (doc *HTMLDocument) ExistsBySelector(ctx context.Context, selector values.String) values.Boolean

func (*HTMLDocument) GetChildNode added in v0.7.0

func (doc *HTMLDocument) GetChildNode(ctx context.Context, idx values.Int) core.Value

func (*HTMLDocument) GetChildNodes added in v0.7.0

func (doc *HTMLDocument) GetChildNodes(ctx context.Context) core.Value

func (*HTMLDocument) GetCookies added in v0.7.0

func (doc *HTMLDocument) GetCookies(_ context.Context) (*values.Array, error)

func (*HTMLDocument) GetIn added in v0.7.0

func (doc *HTMLDocument) GetIn(ctx context.Context, path []core.Value) (core.Value, error)

func (*HTMLDocument) GetURL added in v0.7.0

func (doc *HTMLDocument) GetURL() core.Value

func (*HTMLDocument) Hash added in v0.7.0

func (doc *HTMLDocument) Hash() uint64

func (*HTMLDocument) InputBySelector added in v0.7.0

func (doc *HTMLDocument) InputBySelector(_ context.Context, _ values.String, _ core.Value, _ values.Int) (values.Boolean, error)

func (*HTMLDocument) Iterate added in v0.7.0

func (doc *HTMLDocument) Iterate(_ context.Context) (core.Iterator, error)

func (*HTMLDocument) Length added in v0.7.0

func (doc *HTMLDocument) Length() values.Int

func (*HTMLDocument) MarshalJSON added in v0.7.0

func (doc *HTMLDocument) MarshalJSON() ([]byte, error)

func (*HTMLDocument) MoveMouseBySelector added in v0.7.0

func (doc *HTMLDocument) MoveMouseBySelector(_ context.Context, _ values.String) error

func (*HTMLDocument) MoveMouseByXY added in v0.7.0

func (doc *HTMLDocument) MoveMouseByXY(_ context.Context, _, _ values.Float) error

func (*HTMLDocument) Navigate added in v0.7.0

func (doc *HTMLDocument) Navigate(_ context.Context, _ values.String) error

func (*HTMLDocument) NavigateBack added in v0.7.0

func (doc *HTMLDocument) NavigateBack(_ context.Context, _ values.Int) (values.Boolean, error)

func (*HTMLDocument) NavigateForward added in v0.7.0

func (doc *HTMLDocument) NavigateForward(_ context.Context, _ values.Int) (values.Boolean, error)

func (*HTMLDocument) NodeName added in v0.7.0

func (doc *HTMLDocument) NodeName() values.String

func (*HTMLDocument) NodeType added in v0.7.0

func (doc *HTMLDocument) NodeType() values.Int

func (*HTMLDocument) PrintToPDF added in v0.7.0

func (doc *HTMLDocument) PrintToPDF(_ context.Context, _ drivers.PDFParams) (values.Binary, error)

func (*HTMLDocument) QuerySelector added in v0.7.0

func (doc *HTMLDocument) QuerySelector(ctx context.Context, selector values.String) core.Value

func (*HTMLDocument) QuerySelectorAll added in v0.7.0

func (doc *HTMLDocument) QuerySelectorAll(ctx context.Context, selector values.String) core.Value

func (*HTMLDocument) ScrollBottom added in v0.7.0

func (doc *HTMLDocument) ScrollBottom(_ context.Context) error

func (*HTMLDocument) ScrollBySelector added in v0.7.0

func (doc *HTMLDocument) ScrollBySelector(_ context.Context, _ values.String) error

func (*HTMLDocument) ScrollByXY added in v0.7.0

func (doc *HTMLDocument) ScrollByXY(_ context.Context, _, _ values.Float) error

func (*HTMLDocument) ScrollTop added in v0.7.0

func (doc *HTMLDocument) ScrollTop(_ context.Context) error

func (*HTMLDocument) SelectBySelector added in v0.7.0

func (doc *HTMLDocument) SelectBySelector(_ context.Context, _ values.String, _ *values.Array) (*values.Array, error)

func (*HTMLDocument) SetCookies added in v0.7.0

func (doc *HTMLDocument) SetCookies(_ context.Context, _ ...drivers.HTTPCookie) error

func (*HTMLDocument) SetIn added in v0.7.0

func (doc *HTMLDocument) SetIn(ctx context.Context, path []core.Value, value core.Value) error

func (*HTMLDocument) SetURL added in v0.7.0

func (doc *HTMLDocument) SetURL(_ context.Context, _ values.String) error

func (*HTMLDocument) String added in v0.7.0

func (doc *HTMLDocument) String() string

func (*HTMLDocument) Type

func (doc *HTMLDocument) Type() core.Type

func (*HTMLDocument) Unwrap added in v0.7.0

func (doc *HTMLDocument) Unwrap() interface{}

func (*HTMLDocument) WaitForAttributeBySelector added in v0.7.0

func (doc *HTMLDocument) WaitForAttributeBySelector(_ context.Context, _, _ values.String, _ core.Value, _ drivers.WaitEvent) error

func (*HTMLDocument) WaitForAttributeBySelectorAll added in v0.7.0

func (doc *HTMLDocument) WaitForAttributeBySelectorAll(_ context.Context, _, _ values.String, _ core.Value, _ drivers.WaitEvent) error

func (*HTMLDocument) WaitForClassBySelector added in v0.7.0

func (doc *HTMLDocument) WaitForClassBySelector(_ context.Context, _, _ values.String, _ drivers.WaitEvent) error

func (*HTMLDocument) WaitForClassBySelectorAll added in v0.7.0

func (doc *HTMLDocument) WaitForClassBySelectorAll(_ context.Context, _, _ values.String, _ drivers.WaitEvent) error

func (*HTMLDocument) WaitForElement added in v0.7.0

func (doc *HTMLDocument) WaitForElement(_ context.Context, _ values.String, _ drivers.WaitEvent) error

func (*HTMLDocument) WaitForNavigation added in v0.7.0

func (doc *HTMLDocument) WaitForNavigation(_ context.Context) error

func (*HTMLDocument) WaitForStyleBySelector added in v0.7.0

func (doc *HTMLDocument) WaitForStyleBySelector(_ context.Context, _, _ values.String, _ core.Value, _ drivers.WaitEvent) error

func (*HTMLDocument) WaitForStyleBySelectorAll added in v0.7.0

func (doc *HTMLDocument) WaitForStyleBySelectorAll(_ context.Context, _, _ values.String, _ core.Value, _ drivers.WaitEvent) error

type HTMLElement

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

func (*HTMLElement) Click added in v0.7.0

func (el *HTMLElement) Click(_ context.Context) (values.Boolean, error)

func (*HTMLElement) Close added in v0.7.0

func (el *HTMLElement) Close() error

func (*HTMLElement) Compare

func (el *HTMLElement) Compare(other core.Value) int64

func (*HTMLElement) Copy

func (el *HTMLElement) Copy() core.Value

func (*HTMLElement) CountBySelector

func (el *HTMLElement) CountBySelector(_ context.Context, selector values.String) values.Int

func (*HTMLElement) ExistsBySelector

func (el *HTMLElement) ExistsBySelector(_ context.Context, selector values.String) values.Boolean

func (*HTMLElement) GetAttribute

func (el *HTMLElement) GetAttribute(_ context.Context, name values.String) core.Value

func (*HTMLElement) GetAttributes

func (el *HTMLElement) GetAttributes(_ context.Context) *values.Object

func (*HTMLElement) GetChildNode

func (el *HTMLElement) GetChildNode(_ context.Context, idx values.Int) core.Value

func (*HTMLElement) GetChildNodes

func (el *HTMLElement) GetChildNodes(_ context.Context) core.Value

func (*HTMLElement) GetIn added in v0.7.0

func (el *HTMLElement) GetIn(ctx context.Context, path []core.Value) (core.Value, error)

func (*HTMLElement) GetStyle added in v0.7.0

func (el *HTMLElement) GetStyle(ctx context.Context, name values.String) (core.Value, error)

func (*HTMLElement) GetStyles added in v0.7.0

func (el *HTMLElement) GetStyles(ctx context.Context) (*values.Object, error)

func (*HTMLElement) GetValue added in v0.7.0

func (el *HTMLElement) GetValue(_ context.Context) core.Value

func (*HTMLElement) Hash

func (el *HTMLElement) Hash() uint64

func (*HTMLElement) Hover added in v0.7.0

func (el *HTMLElement) Hover(_ context.Context) error

func (*HTMLElement) InnerHTML

func (el *HTMLElement) InnerHTML(_ context.Context) values.String

func (*HTMLElement) InnerHTMLBySelector

func (el *HTMLElement) InnerHTMLBySelector(_ context.Context, selector values.String) values.String

func (*HTMLElement) InnerHTMLBySelectorAll

func (el *HTMLElement) InnerHTMLBySelectorAll(_ context.Context, selector values.String) *values.Array

func (*HTMLElement) InnerText

func (el *HTMLElement) InnerText(_ context.Context) values.String

func (*HTMLElement) InnerTextBySelector

func (el *HTMLElement) InnerTextBySelector(_ context.Context, selector values.String) values.String

func (*HTMLElement) InnerTextBySelectorAll

func (el *HTMLElement) InnerTextBySelectorAll(_ context.Context, selector values.String) *values.Array

func (*HTMLElement) Input added in v0.7.0

func (el *HTMLElement) Input(_ context.Context, _ core.Value, _ values.Int) error

func (*HTMLElement) Iterate added in v0.7.0

func (el *HTMLElement) Iterate(_ context.Context) (core.Iterator, error)

func (*HTMLElement) Length

func (el *HTMLElement) Length() values.Int

func (*HTMLElement) MarshalJSON

func (el *HTMLElement) MarshalJSON() ([]byte, error)

func (*HTMLElement) NodeName

func (el *HTMLElement) NodeName() values.String

func (*HTMLElement) NodeType

func (el *HTMLElement) NodeType() values.Int

func (*HTMLElement) QuerySelector

func (el *HTMLElement) QuerySelector(_ context.Context, selector values.String) core.Value

func (*HTMLElement) QuerySelectorAll

func (el *HTMLElement) QuerySelectorAll(_ context.Context, selector values.String) core.Value

func (*HTMLElement) RemoveAttribute added in v0.7.0

func (el *HTMLElement) RemoveAttribute(_ context.Context, name ...values.String) error

func (*HTMLElement) RemoveStyle added in v0.7.0

func (el *HTMLElement) RemoveStyle(ctx context.Context, name ...values.String) error

func (*HTMLElement) ScrollIntoView added in v0.7.0

func (el *HTMLElement) ScrollIntoView(_ context.Context) error

func (*HTMLElement) Select added in v0.7.0

func (el *HTMLElement) Select(_ context.Context, _ *values.Array) (*values.Array, error)

func (*HTMLElement) SetAttribute added in v0.7.0

func (el *HTMLElement) SetAttribute(_ context.Context, name, value values.String) error

func (*HTMLElement) SetAttributes added in v0.7.0

func (el *HTMLElement) SetAttributes(ctx context.Context, attrs *values.Object) error

func (*HTMLElement) SetIn added in v0.7.0

func (el *HTMLElement) SetIn(ctx context.Context, path []core.Value, value core.Value) error

func (*HTMLElement) SetStyle added in v0.7.0

func (el *HTMLElement) SetStyle(ctx context.Context, name values.String, value core.Value) error

func (*HTMLElement) SetStyles added in v0.7.0

func (el *HTMLElement) SetStyles(ctx context.Context, newStyles *values.Object) error

func (*HTMLElement) SetValue added in v0.7.0

func (el *HTMLElement) SetValue(_ context.Context, value core.Value) error

func (*HTMLElement) String

func (el *HTMLElement) String() string

func (*HTMLElement) Type

func (el *HTMLElement) Type() core.Type

func (*HTMLElement) Unwrap

func (el *HTMLElement) Unwrap() interface{}

func (*HTMLElement) WaitForAttribute added in v0.7.0

func (el *HTMLElement) WaitForAttribute(_ context.Context, _ values.String, _ core.Value, _ drivers.WaitEvent) error

func (*HTMLElement) WaitForClass added in v0.7.0

func (el *HTMLElement) WaitForClass(_ context.Context, _ values.String, _ drivers.WaitEvent) error

func (*HTMLElement) WaitForStyle added in v0.7.0

func (el *HTMLElement) WaitForStyle(_ context.Context, _ values.String, _ core.Value, _ drivers.WaitEvent) error

type Option

type Option func(opts *Options)

func WithConcurrency

func WithConcurrency(value int) Option

func WithDefaultBackoff

func WithDefaultBackoff() Option

func WithExponentialBackoff

func WithExponentialBackoff() Option

func WithLinearBackoff

func WithLinearBackoff() Option

func WithMaxRetries

func WithMaxRetries(value int) Option

func WithProxy

func WithProxy(address string) Option

func WithUserAgent

func WithUserAgent(value string) Option

type Options

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

Jump to

Keyboard shortcuts

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