mech

package module
v1.25.5 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2021 License: OSL-3.0 Imports: 8 Imported by: 11

README

Mech

I see him behind my lids in a bright grey shirt
I see him tripping running and falling, covered in dirt
I see a lot of these things lately I know
I know none of it is real

Blood Orange (2013)

Mechanize: anonymous API access

Some users might want to make anonymous requests, because of privacy or any number of other reasons. This module allows people to do that. Most API these days only offically support authenticated access. This is useful for the company providing the API, as they can use the data for their own purposes (analytics etc). However authentication really doesnt do anything for the end user. Its just a pointless burden to getting the information you need for a program you may be writing. Consider that in many cases, the same information is available via HTML on the primary website, usually without being logged in. So why can you do that with HTML, but not with the API? Well you can, using this module.

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

Sites

  1. YouTube
  2. SoundCloud
  3. Deezer
  4. MusicBrainz

Author

Steven Penny

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VoidElement = map[string]bool{
	"br":    true,
	"img":   true,
	"input": true,
	"link":  true,
	"meta":  true,
}

Functions

func ReadRequest added in v1.24.9

func ReadRequest(r io.Reader) (*http.Request, error)

Types

type Decoder added in v1.25.5

type Decoder struct {
	*html.Tokenizer
	html.Token
}

func NewDecoder added in v1.25.5

func NewDecoder(r io.Reader) Decoder

func (Decoder) Attr added in v1.25.5

func (d Decoder) Attr(key string) string

func (*Decoder) AttrSelector added in v1.25.5

func (d *Decoder) AttrSelector(key, val string) bool

func (Decoder) Text added in v1.25.5

func (d Decoder) Text() string

func (*Decoder) TextSelector added in v1.25.5

func (d *Decoder) TextSelector() bool

type Encoder added in v1.24.9

type Encoder struct {
	io.Writer
	// contains filtered or unexported fields
}

func NewEncoder added in v1.24.9

func NewEncoder(w io.Writer) Encoder

func (Encoder) Encode added in v1.24.9

func (e Encoder) Encode(r io.Reader) error

func (*Encoder) SetIndent added in v1.24.9

func (e *Encoder) SetIndent(indent string)

Directories

Path Synopsis
cmd
html-indent command
mech command
media command
youtube command
Deezer
Deezer
MusicBrainz
MusicBrainz
YouTube
YouTube

Jump to

Keyboard shortcuts

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