rod_helper

package
v0.22.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear added in v0.17.3

func Clear()

Clear 清理缓存

func NewBrowser

func NewBrowser(httpProxyURL string, loadAdblock bool) (*rod.Browser, error)

*

  • @Description: 新建一个支持代理的 browser 对象,使用完毕后,需要删除 adblockFilePath 文件夹
  • @param httpProxyURL http://127.0.0.1:10809
  • @return *rod.Browser
  • @return error

func NewBrowserFromDocker

func NewBrowserFromDocker(httpProxyURL, remoteDockerURL string) (*rod.Browser, error)

*

  • @Description: 访问目标 Url,返回 page,只是这个 page 有效,如果再次出发其他的事件无效
  • @param desURL 目标 Url
  • @param httpProxyURL http://127.0.0.1:10809
  • @param timeOut 超时时间
  • @param maxRetryTimes 当是非超时 err 的时候,最多可以重试几次
  • @return *rod.Page
  • @return error

func NewPageNavigate

func NewPageNavigate(browser *rod.Browser, desURL string, timeOut time.Duration, maxRetryTimes int) (*rod.Page, error)

func ReloadBrowser added in v0.14.0

func ReloadBrowser()

ReloadBrowser 提前把浏览器下载好

Types

This section is empty.

Jump to

Keyboard shortcuts

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