youtube

package
v0.0.0-...-4e51bdc Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GET

func GET(ctx context.Context, rawurl string) (*http.Response, error)

func SetDebug

func SetDebug()

Types

type Stream

type Stream struct {
	URL           string `json:"url"`
	Extension     string `json:"extension"`
	Resolution    string `json:"resolution"`
	VideoEncoding string `json:"video_encoding"`
	AudioEncoding string `json:"audio_encoding"`
	Itag          int    `json:"itag"`
	AudioBitrate  int    `json:"audio_bitrate"`
}

type Video

type Video struct {
	ID        string    `json:"id"`
	Title     string    `json:"title"`
	Author    string    `json:"author"`
	Thumbnail string    `json:"thumbnail"`
	Views     int64     `json:"views"`
	Length    int64     `json:"length"`
	Rating    float64   `json:"rating"`
	Timestamp time.Time `json:"timestamp"`
	Streams   []Stream
}

func GetVideo

func GetVideo(rawid string) (Video, error)
func Search(query string) ([]Video, error)

func (Video) Download

func (v Video) Download(ctx context.Context, dir string) error

func (Video) Filename

func (v Video) Filename(dir string) string

func (Video) ThumbnailFilename

func (v Video) ThumbnailFilename(dir string) string

func (Video) Transcode

func (v Video) Transcode(ctx context.Context, dir string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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