dl

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultUA = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChromeInstance

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

func NewChromeLoader

func NewChromeLoader(options ...Option) *ChromeInstance

func (*ChromeInstance) Get

func (bi *ChromeInstance) Get(ctx context.Context, url string) (*http.Response, error)

func (*ChromeInstance) Stop

func (bi *ChromeInstance) Stop()

type HttpInstance

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

func NewHttpLoader

func NewHttpLoader(options ...Option) *HttpInstance

func (*HttpInstance) Get

func (hi *HttpInstance) Get(ctx context.Context, url string, ua string) (*http.Response, error)

type Option

type Option func(*config)

func OptUserAgent

func OptUserAgent(ua string) Option

Jump to

Keyboard shortcuts

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