96 lines
2.4 KiB
Go
96 lines
2.4 KiB
Go
|
package ytdlp
|
||
|
|
||
|
type Format struct {
|
||
|
URL string `json:"url"`
|
||
|
FormatID string `json:"format_id"`
|
||
|
Height int64 `json:"height"`
|
||
|
EXT EXT `json:"ext"`
|
||
|
Protocol Protocol `json:"protocol"`
|
||
|
Resolution string `json:"resolution"`
|
||
|
DynamicRange DynamicRange `json:"dynamic_range"`
|
||
|
AspectRatio *float64 `json:"aspect_ratio"`
|
||
|
FilesizeApprox any `json:"filesize_approx"`
|
||
|
HTTPHeaders HTTPHeaders `json:"http_headers"`
|
||
|
VideoEXT EXT `json:"video_ext"`
|
||
|
AudioEXT AudioEXT `json:"audio_ext"`
|
||
|
Vbr any `json:"vbr"`
|
||
|
ABR any `json:"abr"`
|
||
|
Tbr *float64 `json:"tbr"`
|
||
|
Format string `json:"format"`
|
||
|
FormatIndex any `json:"format_index"`
|
||
|
ManifestURL *string `json:"manifest_url,omitempty"`
|
||
|
FPS *float64 `json:"fps,omitempty"`
|
||
|
Preference any `json:"preference"`
|
||
|
Quality any `json:"quality"`
|
||
|
HasDRM *bool `json:"has_drm,omitempty"`
|
||
|
Width *int64 `json:"width,omitempty"`
|
||
|
Vcodec *string `json:"vcodec,omitempty"`
|
||
|
Acodec *string `json:"acodec,omitempty"`
|
||
|
}
|
||
|
|
||
|
type HTTPHeaders struct {
|
||
|
UserAgent string `json:"User-Agent"`
|
||
|
Accept Accept `json:"Accept"`
|
||
|
AcceptLanguage AcceptLanguage `json:"Accept-Language"`
|
||
|
SECFetchMode SECFetchMode `json:"Sec-Fetch-Mode"`
|
||
|
}
|
||
|
|
||
|
type Subtitles struct {
|
||
|
}
|
||
|
|
||
|
type Thumbnail struct {
|
||
|
URL string `json:"url"`
|
||
|
ID string `json:"id"`
|
||
|
}
|
||
|
|
||
|
type Version struct {
|
||
|
Version string `json:"version"`
|
||
|
CurrentGitHead string `json:"current_git_head"`
|
||
|
ReleaseGitHead string `json:"release_git_head"`
|
||
|
Repository string `json:"repository"`
|
||
|
}
|
||
|
|
||
|
type AudioEXT string
|
||
|
|
||
|
const (
|
||
|
None AudioEXT = "none"
|
||
|
)
|
||
|
|
||
|
type DynamicRange string
|
||
|
|
||
|
const (
|
||
|
SDR DynamicRange = "SDR"
|
||
|
HDR DynamicRange = "HDR"
|
||
|
)
|
||
|
|
||
|
type EXT string
|
||
|
|
||
|
const (
|
||
|
Mp4 EXT = "mp4"
|
||
|
)
|
||
|
|
||
|
type Accept string
|
||
|
|
||
|
const (
|
||
|
TextHTMLApplicationXHTMLXMLApplicationXMLQ09Q08 Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
|
||
|
)
|
||
|
|
||
|
type AcceptLanguage string
|
||
|
|
||
|
const (
|
||
|
EnUsEnQ05 AcceptLanguage = "en-us,en;q=0.5"
|
||
|
)
|
||
|
|
||
|
type SECFetchMode string
|
||
|
|
||
|
const (
|
||
|
Navigate SECFetchMode = "navigate"
|
||
|
)
|
||
|
|
||
|
type Protocol string
|
||
|
|
||
|
const (
|
||
|
HTTPS Protocol = "https"
|
||
|
M3U8Native Protocol = "m3u8_native"
|
||
|
)
|