http

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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) GetDocument

func (drv *Driver) GetDocument(ctx context.Context, targetURL values.String) (values.HTMLDocument, error)

func (*Driver) ParseDocument

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

type HTMLDocument

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

func NewHTMLDocument

func NewHTMLDocument(
	url string,
	node *goquery.Document,
) (*HTMLDocument, error)

func (*HTMLDocument) Compare

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

func (*HTMLDocument) Type

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

func (*HTMLDocument) URL

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

type HTMLElement

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

func NewHTMLElement

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

func (*HTMLElement) Compare

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

func (*HTMLElement) Copy

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

func (*HTMLElement) CountBySelector

func (el *HTMLElement) CountBySelector(selector values.String) values.Int

func (*HTMLElement) ExistsBySelector

func (el *HTMLElement) ExistsBySelector(selector values.String) values.Boolean

func (*HTMLElement) GetAttribute

func (el *HTMLElement) GetAttribute(name values.String) core.Value

func (*HTMLElement) GetAttributes

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

func (*HTMLElement) GetChildNode

func (el *HTMLElement) GetChildNode(idx values.Int) core.Value

func (*HTMLElement) GetChildNodes

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

func (*HTMLElement) Hash

func (el *HTMLElement) Hash() uint64

func (*HTMLElement) InnerHTML

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

func (*HTMLElement) InnerHTMLBySelector

func (el *HTMLElement) InnerHTMLBySelector(selector values.String) values.String

func (*HTMLElement) InnerHTMLBySelectorAll

func (el *HTMLElement) InnerHTMLBySelectorAll(selector values.String) *values.Array

func (*HTMLElement) InnerText

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

func (*HTMLElement) InnerTextBySelector

func (el *HTMLElement) InnerTextBySelector(selector values.String) values.String

func (*HTMLElement) InnerTextBySelectorAll

func (el *HTMLElement) InnerTextBySelectorAll(selector values.String) *values.Array

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(selector values.String) core.Value

func (*HTMLElement) QuerySelectorAll

func (el *HTMLElement) QuerySelectorAll(selector values.String) core.Value

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) Value

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

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