Documentation
¶
Overview ¶
YouTube
Index ¶
Constants ¶
View Source
const ( WidthAutoHeightBlack = 0 WidthAuto = 1 WidthBlack = 2 HeightCrop = 3 )
View Source
const ( JPG = 1 WebP = 0 )
Variables ¶
View Source
var ( ClientAndroid = Client{"ANDROID", "15.01"} ClientMWeb = Client{"MWEB", "2.19700101"} )
View Source
var AdaptiveImages = Images{ {90, WidthAutoHeightBlack, JPG, "default"}, {90, WidthAutoHeightBlack, WebP, "default"}, {90, WidthBlack, JPG, "1"}, {90, WidthBlack, JPG, "2"}, {90, WidthBlack, JPG, "3"}, {90, WidthBlack, WebP, "1"}, {90, WidthBlack, WebP, "2"}, {90, WidthBlack, WebP, "3"}, {180, HeightCrop, JPG, "mq1"}, {180, HeightCrop, JPG, "mq2"}, {180, HeightCrop, JPG, "mq3"}, {180, HeightCrop, WebP, "mq1"}, {180, HeightCrop, WebP, "mq2"}, {180, HeightCrop, WebP, "mq3"}, {180, WidthAuto, JPG, "mqdefault"}, {180, WidthAuto, WebP, "mqdefault"}, {360, WidthAutoHeightBlack, JPG, "0"}, {360, WidthAutoHeightBlack, JPG, "hqdefault"}, {360, WidthAutoHeightBlack, WebP, "0"}, {360, WidthAutoHeightBlack, WebP, "hqdefault"}, {360, WidthBlack, JPG, "hq1"}, {360, WidthBlack, JPG, "hq2"}, {360, WidthBlack, JPG, "hq3"}, {360, WidthBlack, WebP, "hq1"}, {360, WidthBlack, WebP, "hq2"}, {360, WidthBlack, WebP, "hq3"}, {480, WidthAutoHeightBlack, JPG, "sddefault"}, {480, WidthAutoHeightBlack, WebP, "sddefault"}, {480, WidthBlack, JPG, "sd1"}, {480, WidthBlack, JPG, "sd2"}, {480, WidthBlack, JPG, "sd3"}, {480, WidthBlack, WebP, "sd1"}, {480, WidthBlack, WebP, "sd2"}, {480, WidthBlack, WebP, "sd3"}, {720, WidthAuto, JPG, "hq720"}, {720, WidthAuto, JPG, "maxresdefault"}, {720, WidthAuto, WebP, "hq720"}, {720, WidthAuto, WebP, "maxresdefault"}, {720, WidthBlack, JPG, "maxres1"}, {720, WidthBlack, JPG, "maxres2"}, {720, WidthBlack, JPG, "maxres3"}, {720, WidthBlack, WebP, "maxres1"}, {720, WidthBlack, WebP, "maxres2"}, {720, WidthBlack, WebP, "maxres3"}, }
Functions ¶
This section is empty.
Types ¶
type Client ¶ added in v1.16.9
type Client struct {
ClientName string `json:"clientName"`
ClientVersion string `json:"clientVersion"`
}
func (Client) PlayerRequest ¶ added in v1.18.2
func (c Client) PlayerRequest(id string) PlayerRequest
type CompactVideoRenderer ¶ added in v1.16.9
type CompactVideoRenderer struct {
VideoID string
}
type Format ¶
type Player ¶ added in v1.13.0
type Player struct {
Microformat struct {
PlayerMicroformatRenderer struct {
AvailableCountries []string
PublishDate string
}
}
PlayabilityStatus struct {
Reason string
}
StreamingData struct {
AdaptiveFormats Formats
}
VideoDetails VideoDetails
}
type PlayerRequest ¶ added in v1.18.2
type Search ¶ added in v1.11.2
type Search struct {
Contents struct {
SectionListRenderer struct {
Contents []struct {
ItemSectionRenderer struct {
Contents []struct {
CompactVideoRenderer CompactVideoRenderer
}
}
}
}
}
}
func (Search) Videos ¶ added in v1.18.2
func (r Search) Videos() []CompactVideoRenderer
type SearchRequest ¶ added in v1.18.2
func NewSearchRequest ¶ added in v1.18.2
func NewSearchRequest(query string) SearchRequest
func (SearchRequest) Post ¶ added in v1.18.2
func (s SearchRequest) Post() (*Search, error)
Click to show internal directories.
Click to hide internal directories.