browser

package
v0.0.0-...-9eaa835 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

README

导入模块

import "gitee.com/baixudong/spider_tools/browser"

test

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Browser_client

type Browser_client struct {
	Browser   playwright.BrowserContext
	Temp_path string
}

func Browser

func Browser(kwg Browser_options) (*Browser_client, error)

func (*Browser_client) Page

func (self *Browser_client) Page(page_options ...Page_options) (*Page_client, error)

type Browser_options

type Browser_options struct {
	Temp_path       string
	Js_paths        []string
	Args            []string
	ChromiumSandbox *bool
	Devtools        *bool
	DownloadsPath   *string
	ExecutablePath  *string
	HandleSIGHUP    *bool
	HandleSIGINT    *bool
	HandleSIGTERM   *bool
	Headless        *bool
	SlowMo          *float64
	Timeout         *float64
}

type Page_client

type Page_client struct {
	Page        playwright.Page
	Temp_path   string
	Session     *reqs.Client_data
	Proxies     string
	Canche_not  bool
	Req_keys    []string
	Change_send func(*Req_send)
	Change_recv func(Req_send, *Req_recv)
}

func (*Page_client) Goto

func (self *Page_client) Goto(url string)

func (*Page_client) Route

func (self *Page_client) Route()

func (*Page_client) Route_func

func (self *Page_client) Route_func(route playwright.Route, request playwright.Request)

type Page_options

type Page_options struct {
	Proxies    string
	Canche_not bool
}

type Req_recv

type Req_recv struct {
	Body    []byte
	Headers map[string]string
	Status  int
}

type Req_send

type Req_send struct {
	Body    []byte
	Headers map[string]string
	Method  string
	Url     string
}

Jump to

Keyboard shortcuts

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