youtube

package
v1.4.128 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: MIT Imports: 16 Imported by: 2

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 VideoMeta added in v1.4.89

type VideoMeta struct {
	Id              string
	Title           string
	TitleNormalized string
}

type YouTube

type YouTube struct {
	*plugins.PluginBase
	ApiKey *plugins.SetupQuestion
	// contains filtered or unexported fields
}

func NewYouTube

func NewYouTube() (ret *YouTube)

func (*YouTube) FetchAndPrintPlaylist added in v1.4.89

func (o *YouTube) FetchAndPrintPlaylist(playlistID string) (err error)

func (*YouTube) FetchAndSavePlaylist added in v1.4.89

func (o *YouTube) FetchAndSavePlaylist(playlistID, filename string) (err error)

FetchAndSavePlaylist fetches all videos in a playlist and saves them to a CSV file.

func (*YouTube) FetchPlaylistVideos added in v1.4.89

func (o *YouTube) FetchPlaylistVideos(playlistID string) (ret []*VideoMeta, err error)

FetchPlaylistVideos fetches all videos from a YouTube playlist.

func (*YouTube) GetVideoOrPlaylistId added in v1.4.89

func (o *YouTube) GetVideoOrPlaylistId(url string) (videoId string, playlistId 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, language string) (ret string, err error)

func (*YouTube) GrabTranscriptBase

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

func (*YouTube) GrabTranscriptForUrl

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

func (*YouTube) SaveVideosToCSV added in v1.4.89

func (o *YouTube) SaveVideosToCSV(filename string, videos []*VideoMeta) (err error)

SaveVideosToCSV saves the list of videos to a CSV file.

Jump to

Keyboard shortcuts

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