yt

package module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractID

func ExtractID(s string) string

ExtractID returns the YouTube video ID from either a full URL or an ID. Returns empty string if nothing valid is found.

func NormalizeURL

func NormalizeURL(s string) string

Types

type DownloadOptions

type DownloadOptions struct {
	URL string

	OutputDir  string
	OutputName string
	Timeout    time.Duration
}

type Result

type Result struct {
	VideoID    string
	Title      string
	Author     string
	FilePath   string
	FileName   string
	MimeType   string
	Quality    string
	Itag       int
	ContentLen int64
}

func Download

func Download(opts DownloadOptions) (*Result, error)

Directories

Path Synopsis
cmd
ytdl command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL