68 lines
2.6 KiB
Go
68 lines
2.6 KiB
Go
package youtube
|
|
|
|
type Video struct {
|
|
StreamingData struct {
|
|
AdaptiveFormats []struct {
|
|
ApproxDurationMs string `json:"approxDurationMs"`
|
|
AudioChannels int64 `json:"audioChannels"`
|
|
AudioQuality string `json:"audioQuality"`
|
|
AudioSampleRate string `json:"audioSampleRate"`
|
|
AverageBitrate int64 `json:"averageBitrate"`
|
|
Bitrate int64 `json:"bitrate"`
|
|
ColorInfo struct {
|
|
MatrixCoefficients string `json:"matrixCoefficients"`
|
|
Primaries string `json:"primaries"`
|
|
TransferCharacteristics string `json:"transferCharacteristics"`
|
|
} `json:"colorInfo"`
|
|
ContentLength string `json:"contentLength"`
|
|
Fps int64 `json:"fps"`
|
|
Height int64 `json:"height"`
|
|
HighReplication bool `json:"highReplication"`
|
|
IndexRange struct {
|
|
End string `json:"end"`
|
|
Start string `json:"start"`
|
|
} `json:"indexRange"`
|
|
InitRange struct {
|
|
End string `json:"end"`
|
|
Start string `json:"start"`
|
|
} `json:"initRange"`
|
|
Itag int64 `json:"itag"`
|
|
LastModified string `json:"lastModified"`
|
|
LoudnessDB float64 `json:"loudnessDb"`
|
|
MimeType string `json:"mimeType"`
|
|
ProjectionType string `json:"projectionType"`
|
|
Quality string `json:"quality"`
|
|
QualityLabel string `json:"qualityLabel"`
|
|
URL string `json:"url"`
|
|
Width int64 `json:"width"`
|
|
} `json:"adaptiveFormats"`
|
|
AspectRatio float64 `json:"aspectRatio"`
|
|
ExpiresInSeconds string `json:"expiresInSeconds"`
|
|
HlsManifestURL string `json:"hlsManifestUrl"`
|
|
ServerAbrStreamingURL string `json:"serverAbrStreamingUrl"`
|
|
} `json:"streamingData"`
|
|
VideoDetails struct {
|
|
AllowRatings bool `json:"allowRatings"`
|
|
Author string `json:"author"`
|
|
ChannelID string `json:"channelId"`
|
|
IsCrawlable bool `json:"isCrawlable"`
|
|
IsLiveContent bool `json:"isLiveContent"`
|
|
IsOwnerViewing bool `json:"isOwnerViewing"`
|
|
IsPrivate bool `json:"isPrivate"`
|
|
IsUnpluggedCorpus bool `json:"isUnpluggedCorpus"`
|
|
Keywords []string `json:"keywords"`
|
|
LengthSeconds string `json:"lengthSeconds"`
|
|
ShortDescription string `json:"shortDescription"`
|
|
Thumbnail struct {
|
|
Thumbnails []struct {
|
|
Height int64 `json:"height"`
|
|
URL string `json:"url"`
|
|
Width int64 `json:"width"`
|
|
} `json:"thumbnails"`
|
|
} `json:"thumbnail"`
|
|
Title string `json:"title"`
|
|
VideoID string `json:"videoId"`
|
|
ViewCount string `json:"viewCount"`
|
|
} `json:"videoDetails"`
|
|
}
|