reqs

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: 28 Imported by: 0

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 Bs4_selection

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

文档树操作========================================================================= start

func Bs4

func Bs4(txt string) (*Bs4_selection, error)

func (*Bs4_selection) After

func (object *Bs4_selection) After(str string) *Bs4_selection

func (*Bs4_selection) Append

func (object *Bs4_selection) Append(str string) *Bs4_selection

func (*Bs4_selection) Attrs

func (object *Bs4_selection) Attrs() map[string]string

func (*Bs4_selection) Before

func (object *Bs4_selection) Before(str string) *Bs4_selection

func (*Bs4_selection) Childrens

func (object *Bs4_selection) Childrens(election ...string) []*Bs4_selection

func (*Bs4_selection) Clear

func (object *Bs4_selection) Clear() *Bs4_selection

func (*Bs4_selection) Contents

func (object *Bs4_selection) Contents(election ...string) []*Bs4_selection

func (*Bs4_selection) Copy

func (object *Bs4_selection) Copy() *Bs4_selection

func (*Bs4_selection) Del

func (object *Bs4_selection) Del(key string) *Bs4_selection

func (*Bs4_selection) Find

func (object *Bs4_selection) Find(election string) *Bs4_selection

func (*Bs4_selection) Finds

func (object *Bs4_selection) Finds(election string) []*Bs4_selection

func (*Bs4_selection) Get

func (object *Bs4_selection) Get(key string, defaultValue ...string) string

func (*Bs4_selection) Has

func (object *Bs4_selection) Has(object2 *Bs4_selection) bool

func (*Bs4_selection) Html

func (object *Bs4_selection) Html(str ...string) (string, error)

func (*Bs4_selection) Name

func (object *Bs4_selection) Name() string

func (*Bs4_selection) Next

func (object *Bs4_selection) Next(election ...string) *Bs4_selection

func (*Bs4_selection) Nexts

func (object *Bs4_selection) Nexts(election ...string) []*Bs4_selection

func (*Bs4_selection) Parent

func (object *Bs4_selection) Parent(election ...string) *Bs4_selection

func (*Bs4_selection) Parents

func (object *Bs4_selection) Parents(election ...string) []*Bs4_selection

func (*Bs4_selection) Prepend

func (object *Bs4_selection) Prepend(str string) *Bs4_selection

修改文档树操作

func (*Bs4_selection) Prev

func (object *Bs4_selection) Prev(election ...string) *Bs4_selection

func (*Bs4_selection) Prevs

func (object *Bs4_selection) Prevs(election ...string) []*Bs4_selection

func (*Bs4_selection) Remove

func (object *Bs4_selection) Remove() *Bs4_selection

func (*Bs4_selection) Replace

func (object *Bs4_selection) Replace(str string) *Bs4_selection

func (*Bs4_selection) Set

func (object *Bs4_selection) Set(key string, val string) *Bs4_selection

func (*Bs4_selection) Sibs

func (object *Bs4_selection) Sibs(election ...string) []*Bs4_selection

func (*Bs4_selection) Strings

func (object *Bs4_selection) Strings() []string

func (*Bs4_selection) Text

func (object *Bs4_selection) Text(str ...string) string

type Client_data

type Client_data struct {
	Client *http.Client
}

func Session

func Session() (*Client_data, error)

func (*Client_data) Request

func (session *Client_data) Request(method string, u string, options ...Request_Options) (response_data, error)

type Mongo_client

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

func Mongo

func Mongo(ip string, port int) (*Mongo_client, error)

func (*Mongo_client) Table

func (object *Mongo_client) Table(db_name string, table_name string) *Mongo_table

type Mongo_options

type Mongo_options struct {
	Limit   *int32
	Timeout int
	Show    interface{}
	Skip    *int64
	Sort    interface{}
}

func (*Mongo_options) Conver_find

func (opt *Mongo_options) Conver_find() *options.FindOneOptions

func (*Mongo_options) Conver_finds

func (opt *Mongo_options) Conver_finds() *options.FindOptions

type Mongo_table

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

func (*Mongo_table) Add

func (object *Mongo_table) Add(document ...interface{}) interface{}

func (*Mongo_table) Del

func (object *Mongo_table) Del(document interface{}) interface{}

func (*Mongo_table) Dels

func (object *Mongo_table) Dels(document interface{}) interface{}

func (*Mongo_table) Find

func (object *Mongo_table) Find(filter interface{}, opts ...Mongo_options) interface{}

func (*Mongo_table) Finds

func (object *Mongo_table) Finds(filter interface{}, opts ...Mongo_options) []interface{}

func (*Mongo_table) Update

func (object *Mongo_table) Update(filter interface{}, update interface{}) interface{}

func (*Mongo_table) Updates

func (object *Mongo_table) Updates(filter interface{}, update interface{}) interface{}

func (*Mongo_table) Upsert

func (object *Mongo_table) Upsert(filter interface{}, update interface{}) interface{}

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 Pool_client

type Pool_client struct {
	Max     int
	Run_num int
	Ctx     context.Context
}

func Pool

func Pool(ctx context.Context, max int) *Pool_client

func (*Pool_client) Join

func (object *Pool_client) Join()

func (*Pool_client) Run

func (object *Pool_client) Run(task Task)

func (*Pool_client) Timer

func (object *Pool_client) Timer(ctx context.Context)

func (*Pool_client) Write

func (object *Pool_client) Write(task Task)

type Redis_table

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

func Redis

func Redis(ip string, port int, db int, pwd ...string) *Redis_table

func (*Redis_table) Get_proxies

func (r *Redis_table) Get_proxies() string

func (*Redis_table) Hall

func (r *Redis_table) Hall(name string) map[string]string

func (*Redis_table) Hdel

func (r *Redis_table) Hdel(name string, key string) int

func (*Redis_table) Hget

func (r *Redis_table) Hget(name string, key string) string

func (*Redis_table) Hkeys

func (r *Redis_table) Hkeys(name string) []string

func (*Redis_table) Hlen

func (r *Redis_table) Hlen(name string) int

func (*Redis_table) Hset

func (r *Redis_table) Hset(name string, key string, val string) bool

func (*Redis_table) Hvals

func (r *Redis_table) Hvals(name string) []string

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
}

type Request_Options

type Request_Options struct {
	Proxies   string
	Timeout   int
	Headers   map[string]string
	Cookies   map[string]string
	Data      map[string]string
	Data_byte []byte
	Json      string
}

type Task

type Task struct {
	Fun      interface{}
	Callback func(context.Context, []reflect.Value)
	Args     []interface{}
	Timeout  int
}

Jump to

Keyboard shortcuts

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