ctp

package
v0.0.0-...-7ce39f2 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: MIT Imports: 9 Imported by: 0

README

ctp

参考

代理网站

爬取脚本

JSON.stringify(Array.from(document.getElementById('ipc').querySelector('tbody').children).map(e=>'http://'+e.children[0].innerText+':'+e.children[1].innerText))

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(uri string) ([]byte, error)

func GetByProxy

func GetByProxy(proxyAddr string, targetAddr string) error

GetByProxy 用于测试代理地址是否可访问,不能访问时会抛出错误,当然,这种方式不准确,因为可能是目标服务器出现了问题

func Save

func Save(uri string, fileName string) error

Types

type Ctp

type Ctp struct {
	*colly.Collector
}

func New

func New() *Ctp

func (*Ctp) EnableInsecureTLS

func (m *Ctp) EnableInsecureTLS(value bool)

EnableInsecureTLS 是否忽略证书校验企业微信的一些接口请求需要忽略证书校验

func (*Ctp) Get

func (m *Ctp) Get(uri string) ([]byte, error)

Get

func (*Ctp) Request

func (m *Ctp) Request(uri string, orgin string, callback func(resp *colly.Response)) error

Request 请求http数据接口

func (*Ctp) Save

func (m *Ctp) Save(uri string, fileName string) error

Save 请求http数据接口

func (*Ctp) SetProxies

func (m *Ctp) SetProxies(addr ...string) *Ctp

SetProxies

type CtpPool

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

func NewPool

func NewPool() *CtpPool

func (*CtpPool) Save

func (m *CtpPool) Save(uri string, fileName string)

func (*CtpPool) Wait

func (m *CtpPool) Wait()

Jump to

Keyboard shortcuts

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