Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Key = Auth{"X-Goog-Api-Key", "AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8"} Verbose = false )
View Source
var ( Android = Client{Name: "ANDROID", Version: "16.05"} Embed = Client{Name: "ANDROID", Screen: "EMBED", Version: "16.05"} Mweb = Client{Name: "MWEB", Version: "2.19700101"} )
View Source
var Params = map[string]map[string]Message{
"SORT BY": {
"Relevance": {
tag{1, varintType}, varint(0),
},
"Rating": {
tag{1, varintType}, varint(1),
},
"Upload date": {
tag{1, varintType}, varint(2),
},
"View count": {
tag{1, varintType}, varint(3),
},
},
"UPLOAD DATE": {
"Last hour": {
tag{2, bytesType}, lengthPrefix{
tag{1, varintType}, varint(1),
},
},
"Today": {
tag{2, bytesType}, lengthPrefix{
tag{1, varintType}, varint(2),
},
},
"This week": {
tag{2, bytesType}, lengthPrefix{
tag{1, varintType}, varint(3),
},
},
"This month": {
tag{2, bytesType}, lengthPrefix{
tag{1, varintType}, varint(4),
},
},
"This year": {
tag{2, bytesType}, lengthPrefix{
tag{1, varintType}, varint(5),
},
},
},
"TYPE": {
"Video": {
tag{2, bytesType}, lengthPrefix{
tag{2, varintType}, varint(1),
},
},
"Channel": {
tag{2, bytesType}, lengthPrefix{
tag{2, varintType}, varint(2),
},
},
"Playlist": {
tag{2, bytesType}, lengthPrefix{
tag{2, varintType}, varint(3),
},
},
"Movie": {
tag{2, bytesType}, lengthPrefix{
tag{2, varintType}, varint(4),
},
},
},
"DURATION": {
"Under 4 minutes": {
tag{2, bytesType}, lengthPrefix{
tag{3, varintType}, varint(1),
},
},
"Over 20 minutes": {
tag{2, bytesType}, lengthPrefix{
tag{3, varintType}, varint(2),
},
},
"4 - 20 minutes": {
tag{2, bytesType}, lengthPrefix{
tag{3, varintType}, varint(3),
},
},
},
"FEATURES": {
"HD": {
tag{2, bytesType}, lengthPrefix{
tag{4, varintType}, varint(1),
},
},
"Subtitles/CC": {
tag{2, bytesType}, lengthPrefix{
tag{5, varintType}, varint(1),
},
},
"Creative Commons": {
tag{2, bytesType}, lengthPrefix{
tag{6, varintType}, varint(1),
},
},
"3D": {
tag{2, bytesType}, lengthPrefix{
tag{7, varintType}, varint(1),
},
},
"Live": {
tag{2, bytesType}, lengthPrefix{
tag{8, varintType}, varint(1),
},
},
"Purchased": {
tag{2, bytesType}, lengthPrefix{
tag{9, varintType}, varint(1),
},
},
"4K": {
tag{2, bytesType}, lengthPrefix{
tag{14, varintType}, varint(1),
},
},
"360°": {
tag{2, bytesType}, lengthPrefix{
tag{15, varintType}, varint(1),
},
},
"Location": {
tag{2, bytesType}, lengthPrefix{
tag{23, varintType}, varint(1),
},
},
"HDR": {
tag{2, bytesType}, lengthPrefix{
tag{25, varintType}, varint(1),
},
},
"VR180": {
tag{2, bytesType}, lengthPrefix{
tag{26, varintType}, varint(1),
},
},
},
}
View Source
var Pictures = PictureSlice{
{120, 90, 68, "default", jpg},
{120, 90, 90, "1", jpg},
{120, 90, 90, "2", jpg},
{120, 90, 90, "3", jpg},
{120, 90, 68, "default", webP},
{120, 90, 90, "1", webP},
{120, 90, 90, "2", webP},
{120, 90, 90, "3", webP},
{320, 180, 180, "mqdefault", jpg},
{320, 180, 320, "mq1", jpg},
{320, 180, 320, "mq2", jpg},
{320, 180, 320, "mq3", jpg},
{320, 180, 180, "mqdefault", webP},
{320, 180, 320, "mq1", webP},
{320, 180, 320, "mq2", webP},
{320, 180, 320, "mq3", webP},
{480, 360, 270, "0", jpg},
{480, 360, 270, "hqdefault", jpg},
{480, 360, 360, "hq1", jpg},
{480, 360, 360, "hq2", jpg},
{480, 360, 360, "hq3", jpg},
{480, 360, 270, "0", webP},
{480, 360, 270, "hqdefault", webP},
{480, 360, 360, "hq1", webP},
{480, 360, 360, "hq2", webP},
{480, 360, 360, "hq3", webP},
{640, 480, 360, "sddefault", jpg},
{640, 480, 480, "sd1", jpg},
{640, 480, 480, "sd2", jpg},
{640, 480, 480, "sd3", jpg},
{640, 480, 360, "sddefault", webP},
{640, 480, 480, "sd1", webP},
{640, 480, 480, "sd2", webP},
{640, 480, 480, "sd3", webP},
{1280, 720, 720, "hq720", jpg},
{1280, 720, 720, "maxres1", jpg},
{1280, 720, 720, "maxres2", jpg},
{1280, 720, 720, "maxres3", jpg},
{1280, 720, 720, "maxresdefault", jpg},
{1280, 720, 720, "hq720", webP},
{1280, 720, 720, "maxres1", webP},
{1280, 720, 720, "maxres2", webP},
{1280, 720, 720, "maxres3", webP},
{1280, 720, 720, "maxresdefault", webP},
}
Functions ¶
Types ¶
type Format ¶
type FormatSlice ¶ added in v1.17.8
type FormatSlice []Format
func (FormatSlice) Filter ¶ added in v1.17.8
func (f FormatSlice) Filter(keep func(Format) bool) FormatSlice
func (FormatSlice) Sort ¶ added in v1.17.8
func (f FormatSlice) Sort(less ...func(a, b Format) bool)
type Item ¶ added in v1.24.9
type Item struct {
CompactVideoRenderer *struct {
LengthText text
Title text
VideoID string
}
}
type Message ¶ added in v1.27.7
func Continuation ¶ added in v1.27.9
type PictureSlice ¶ added in v1.21.9
type PictureSlice []Picture
func (PictureSlice) Filter ¶ added in v1.21.9
func (p PictureSlice) Filter(keep func(Picture) bool) PictureSlice
func (PictureSlice) Sort ¶ added in v1.21.9
func (p PictureSlice) Sort(less ...func(a, b Picture) bool)
type Player ¶ added in v1.13.0
type Player struct {
Microformat struct {
PlayerMicroformatRenderer struct {
AvailableCountries []string
PublishDate string
}
}
PlayabilityStatus struct {
Reason string
Status string
}
StreamingData struct {
AdaptiveFormats FormatSlice
// just including this so I can bail if video is Dash Manifest
DashManifestURL string
}
VideoDetails struct {
Author string
ShortDescription string
Title string
ViewCount int `json:"viewCount,string"`
}
}
func (Player) Description ¶ added in v1.13.0
Click to show internal directories.
Click to hide internal directories.