youtube

package
v0.0.0-...-0d5330c Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

This section is empty.

Types

type Client

type Client struct {
	*youtube.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *Client

func (*Client) GetAudioStreamURL

func (c *Client) GetAudioStreamURL(video *youtube.Video) (string, error)

func (*Client) GetSuggestedVideos

func (c *Client) GetSuggestedVideos(id string) ([]VideoInfo, error)

func (*Client) Search

func (c *Client) Search(query string) ([]VideoInfo, error)

func (*Client) SearchOne

func (c *Client) SearchOne(query string) (VideoInfo, error)

type VideoInfo

type VideoInfo struct {
	ID       string
	Title    string
	Duration time.Duration
}

func ExtractSearchResult

func ExtractSearchResult(r io.Reader) ([]VideoInfo, error)

func ExtractSuggestedVideos

func ExtractSuggestedVideos(r io.Reader) ([]VideoInfo, error)

Jump to

Keyboard shortcuts

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