youtube

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Duration   bool
	Transcript bool
	Comments   bool
	Lang       string
}

type VideoInfo

type VideoInfo struct {
	Transcript string   `json:"transcript"`
	Duration   int      `json:"duration"`
	Comments   []string `json:"comments"`
}

type YouTube

type YouTube struct {
	*common.Configurable
	ApiKey *common.SetupQuestion
	// contains filtered or unexported fields
}

func NewYouTube

func NewYouTube() (ret *YouTube)

func (*YouTube) GetVideoId

func (o *YouTube) GetVideoId(url string) (ret string, err error)

func (*YouTube) Grab

func (o *YouTube) Grab(url string, options *Options) (ret *VideoInfo, err error)

func (*YouTube) GrabByFlags

func (o *YouTube) GrabByFlags() (ret *VideoInfo, err error)

func (*YouTube) GrabComments

func (o *YouTube) GrabComments(videoId string) (ret []string, err error)

func (*YouTube) GrabDuration

func (o *YouTube) GrabDuration(videoId string) (ret int, err error)

func (*YouTube) GrabDurationForUrl

func (o *YouTube) GrabDurationForUrl(url string) (ret int, err error)

func (*YouTube) GrabTranscript

func (o *YouTube) GrabTranscript(videoId string) (ret string, err error)

func (*YouTube) GrabTranscriptBase

func (o *YouTube) GrabTranscriptBase(videoId string) (ret string, err error)

func (*YouTube) GrabTranscriptForUrl

func (o *YouTube) GrabTranscriptForUrl(url string) (ret string, err error)

Jump to

Keyboard shortcuts

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