Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AvailableLanguage ¶
type AvailableLanguage struct {
// Full name of the language translation, e.g. "English"
Name string `json:"name"`
// Code representation of the language's name, e.g. "en"
Code string `json:"code"`
}
AvailableLanguage holds the available translation data of transcripts provided by YouTube
func GetAvailableCaptionLanguages ¶ added in v0.0.2
func GetAvailableCaptionLanguages(url string) ([]AvailableLanguage, error)
type TextChunk ¶ added in v0.0.2
type Video ¶ added in v0.0.2
type Video struct {
Metadata *VideoMetadata `json:"metadata"`
Transcript []TextChunk `json:"transcript"`
}
type VideoMetadata ¶ added in v0.0.2
type VideoMetadata struct {
VideoId string `json:"videoId"`
Title string `json:"title"`
LengthSeconds string `json:"lengthSeconds"`
Keywords []string `json:"keywords"`
ChannelId string `json:"channelId"`
ShortDescription string `json:"shortDescription"`
Thumbnail struct {
Thumbnails []struct {
Url string `json:"url"`
Width int `json:"width"`
Height int `json:"height"`
} `json:"thumbnails"`
} `json:"thumbnail"`
ViewCount string `json:"viewCount"`
Author string `json:"author"`
IsPrivate bool `json:"isPrivate"`
IsLiveContent bool `json:"isLiveContent"`
}
VideoMetadata stores information related to the video, e.g. the title, or the thumbnails
func GetVideoMetadata ¶ added in v0.0.2
func GetVideoMetadata(url string) (*VideoMetadata, error)
Click to show internal directories.
Click to hide internal directories.