Documentation
¶
Index ¶
- Variables
- func Valid(id string) error
- type Auth
- type Client
- type Exchange
- type Format
- type FormatSlice
- type Item
- type OAuth
- type Param
- func (p *Param) Channel()
- func (p *Param) CreativeCommons()
- func (p Param) Encode() (string, error)
- func (p *Param) FourK()
- func (p *Param) FourToTwentyMinutes()
- func (p *Param) HD()
- func (p *Param) HDR()
- func (p *Param) LastHour()
- func (p *Param) Live()
- func (p *Param) Location()
- func (p *Param) Movie()
- func (p *Param) OverTwentyMinutes()
- func (p *Param) Playlist()
- func (p *Param) Purchased()
- func (p *Param) Rating()
- func (p *Param) Relevance()
- func (p *Param) Subtitles()
- func (p *Param) ThisMonth()
- func (p *Param) ThisWeek()
- func (p *Param) ThisYear()
- func (p *Param) ThreeD()
- func (p *Param) ThreeSixty()
- func (p *Param) Today()
- func (p *Param) UnderFourMinutes()
- func (p *Param) UploadDate()
- func (p *Param) VR180()
- func (p *Param) Video()
- func (p *Param) ViewCount()
- type Picture
- type PictureSlice
- type Player
- type Search
Constants ¶
This section is empty.
Variables ¶
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 Key = Auth{"X-Goog-Api-Key", "AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8"}
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},
}
View Source
var Verbose = mech.Verbose
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 Param ¶ added in v1.28.2
type Param struct {
SortBy int `protobuf:"varint,1"`
Filter struct {
UploadDate int `protobuf:"varint,1"`
Type int `protobuf:"varint,2"`
Duration int `protobuf:"varint,3"`
HD int `protobuf:"varint,4"`
Subtitles int `protobuf:"varint,5"`
CreativeCommons int `protobuf:"varint,6"`
ThreeD int `protobuf:"varint,7"`
Live int `protobuf:"varint,8"`
Purchased int `protobuf:"varint,9"`
FourK int `protobuf:"varint,14"`
ThreeSixty int `protobuf:"varint,15"`
Location int `protobuf:"varint,23"`
HDR int `protobuf:"varint,25"`
VR180 int `protobuf:"varint,26"`
} `protobuf:"bytes,2"`
}
func (*Param) FourToTwentyMinutes ¶ added in v1.28.2
func (p *Param) FourToTwentyMinutes()
"EgIYAw=="
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 float64 `json:"viewCount,string"`
}
}
func (Player) Description ¶ added in v1.13.0
Click to show internal directories.
Click to hide internal directories.