Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( WithStandardOutput = func() Option { return func(commands *[]string) { *commands = append(*commands, "-o", "-") } } WithVerbose = func() Option { return func(commands *[]string) { *commands = append(*commands, "-v") } } WithTemplate = func(t Template) Option { return func(commands *[]string) { *commands = append(*commands, "--print", t.String()) } } WithFormat = func(f Format) Option { return func(commands *[]string) { *commands = append(*commands, "-f", f.String()) } } )
View Source
var ErrIvalidURLFormat = errors.New("invalid url format")
Functions ¶
func ExtractURL ¶
Types ¶
type DL ¶
type Duration ¶
func (*Duration) UnmarshalJSON ¶
type Format ¶
type Format string
Format see more format https://github.com/yt-dlp/yt-dlp?tab=readme-ov-file#format-selection
type Template ¶
type Template string
const (
VideoAttributesTemplate Template = `{
"id": %(id)j,
"title": %(title)j,
"webpage_url": %(webpage_url)j,
"duration": "%(duration)j"
}`
)
type VideoAttributes ¶
type VideoAttributes struct { ID string `json:"id"` Title string `json:"title"` WebpageURL string `json:"webpage_url"` Duration Duration `json:"duration"` StartTime Duration `json:"start_time"` }
func (*VideoAttributes) DurationToString ¶
func (a *VideoAttributes) DurationToString() string
Click to show internal directories.
Click to hide internal directories.