mech

package module
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2021 License: OSL-3.0 Imports: 5 Imported by: 11

README

Mech

Mechanize

https://pkg.go.dev/github.com/89z/mech

Sites

  1. Deezer
  2. MusicBrainz
  3. ocr.space
  4. RARBG
  5. Rotten Tomatoes
  6. YouTube

Transport

How can I tell if response is Gzip encoded? With cURL, I can do this:

PS C:\> curl -v -H 'Accept-Encoding: gzip' https://github.com/manifest.json
< content-encoding: gzip

and how can I see the Gzipped size? Same cURL command:

PS C:\> curl -v -H 'Accept-Encoding: gzip' https://github.com/manifest.json
< content-length: 345

Now with Go, how can I tell if response is Gzip encoded? With Go, how can I see the Gzipped size? I dont like how Go is deleting response headers:

Documentation

Index

Constants

View Source
const (
	StatusOK             = http.StatusOK
	StatusPartialContent = http.StatusPartialContent
	StatusSeeOther       = http.StatusSeeOther
)

Variables

View Source
var (
	ErrNoCookie = http.ErrNoCookie
	HandleFunc  = http.HandleFunc
	NewRequest  = http.NewRequest
	Redirect    = http.Redirect
)

Functions

func Get added in v1.15.1

func Get(addr string) (*http.Response, error)

Types

type Cookie = http.Cookie

type Node added in v1.11.6

type Node struct {
	*html.Node
	// contains filtered or unexported fields
}

func Parse added in v1.11.9

func Parse(r io.Reader) (*Node, error)

func (Node) Attr added in v1.11.6

func (n Node) Attr(key string) string

func (Node) ByAttr added in v1.11.7

func (n Node) ByAttr(key, val string) *Node

func (Node) ByTag added in v1.11.6

func (n Node) ByTag(tag string) *Node

keep source as is, return modified copy

func (*Node) Scan added in v1.12.0

func (n *Node) Scan() bool

this can modify the struct now, as we are working with a copy

func (Node) Text added in v1.11.6

func (n Node) Text() string

type Request added in v1.15.1

type Request = http.Request

type Response added in v1.15.0

type Response = http.Response

type ResponseWriter added in v1.15.1

type ResponseWriter = http.ResponseWriter

type Server added in v1.15.1

type Server = http.Server

type Transport added in v1.14.9

type Transport struct {
	http.Transport
}

func (Transport) RoundTrip added in v1.14.9

func (t Transport) RoundTrip(req *http.Request) (*http.Response, error)

Directories

Path Synopsis
cmd
Deezer
Deezer
MusicBrainz
MusicBrainz
OCR
OCR
RARBG
RARBG
research
Rotten Tomatoes
Rotten Tomatoes
YouTube
YouTube

Jump to

Keyboard shortcuts

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