rod

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package rod contains go-rod implementation. It implements some metho

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rod

type Rod struct {
	// Browser is a rod Browser instance.
	Browser *rod.Browser
	// LoadTimeout controlls max page load time before context is canceled.
	LoadTimeout time.Duration
	// PageIdleTime sets the wait time after the page stops receiving requests.
	PageIdleTime time.Duration
}

Rod is responsible for browsser operations.

func (*Rod) ByteToPage

func (r *Rod) ByteToPage(bin []byte) (*rod.Page, error)

ByteToPage converts the binary to a rod Page instance.

func (*Rod) Close

func (r *Rod) Close()

Close closes the Browser connection.

func (*Rod) Connect

func (r *Rod) Connect()

Connect starts the Browser connection.

func (*Rod) UrlToPage

func (r *Rod) UrlToPage(url string) *rod.Page

UrlToPage converts the URL to a rod Page instance.

func (*Rod) WaitLoad

func (r *Rod) WaitLoad(page *rod.Page)

WaitLoad sets a wait time according to the page loading.

Jump to

Keyboard shortcuts

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