Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoYoutubeDLOutput = fmt.Errorf("youtubedlwrapper: youtube-dl returned no output")
Functions ¶
This section is empty.
Types ¶
type AutomaticCaption ¶
type DownloaderOptions ¶
type DownloaderOptions struct {
HTTPChunkSize int `json:"http_chunk_size"`
}
type Format ¶
type Format struct { FormatID string `json:"format_id"` ManifestURL string `json:"manifest_url,omitempty"` Ext string `json:"ext"` Width int `json:"width"` Height int `json:"height"` Tbr float64 `json:"tbr"` Asr int `json:"asr"` Fps int `json:"fps"` Language string `json:"language,omitempty"` FormatNote string `json:"format_note"` Filesize int `json:"filesize"` Container string `json:"container,omitempty"` Vcodec string `json:"vcodec"` Acodec string `json:"acodec"` URL string `json:"url"` FragmentBaseURL string `json:"fragment_base_url,omitempty"` Fragments []Fragment `json:"fragments,omitempty"` Protocol string `json:"protocol"` Format string `json:"format"` HTTPHeaders HTTPHeaders `json:"http_headers"` Quality int `json:"quality,omitempty"` Abr float64 `json:"abr,omitempty"` DownloaderOptions DownloaderOptions `json:"downloader_options,omitempty"` Vbr float64 `json:"vbr,omitempty"` }
type HTTPHeaders ¶
type Options ¶
type Options struct { Username string Password string Videopassword string Ap_mso string Ap_password string Usenetrc bool //verbose //quiet //no_warnings //forceurl //forcetitle //forceid //forcethumbnail //forcedescription //forcefilename //forceduration //forcejson //Dump_single_json bool Simulate bool Format string Outtmpl string Restrictfilenames bool Ignoreerrors bool Force_generic_extractor bool Nooverwrites bool Playliststart int Playlistend int Playlist_items []int Playlistreverse bool Playlistrandom bool Matchtitle bool Rejecttitle bool //logger //logtostderr Writedesription bool Writeinfojson bool Writeannotations bool Writethumbnail bool Write_all_thumbnails bool Writesubtitles bool Writeautomaticsub bool Allsubtitles bool Listsubtitles bool Subtitlesformat string Subtitleslangs []string Keepvideo bool Daterange string Skip_download bool Cachedir string Noplaylist bool Age_limit int Min_views int Max_views int Download_archive string Cookiefile string Nocheckcertificate bool Prefer_insecure bool Proxy string Geo_verification_proxy string Socket_timeout int //bidi_workaround //debug_printtraffic Include_ads bool Default_search string Encoding string Extract_flat bool //postprocessors //progress_hooks Fixup string Source_address net.Addr Call_home bool Sleep_interval int Max_sleep_interval int //listformats //list_thumbnails //match_filter //no_color Geo_bypass bool Geo_bypass_country string //external_downloader //hls_prefer_native //implement parameters for different downloaders? Prefer_ffmpeg bool Postprocessor_args []string Youtube_include_dash_manifest bool }
type PlaylistMetadata ¶
type PlaylistMetadata struct { Type string `json:"_type"` Videos []VideoMetadata `json:"entries"` ID string `json:"id"` Title string `json:"title"` Uploader string `json:"uploader"` UploaderID string `json:"uploader_id"` UploaderURL string `json:"uploader_url"` Extractor string `json:"extractor"` WebpageURL string `json:"webpage_url"` WebpageURLBasename string `json:"webpage_url_basename"` ExtractorKey string `json:"extractor_key"` }
type VideoMetadata ¶
type VideoMetadata struct { ID string `json:"id"` Title string `json:"title"` Formats []Format `json:"formats"` Thumbnails []Thumbnail `json:"thumbnails"` Description string `json:"description"` UploadDate string `json:"upload_date"` Uploader string `json:"uploader"` UploaderID string `json:"uploader_id"` UploaderURL string `json:"uploader_url"` ChannelID string `json:"channel_id"` ChannelURL string `json:"channel_url"` Duration int `json:"duration"` ViewCount int `json:"view_count"` AverageRating float64 `json:"average_rating"` AgeLimit int `json:"age_limit"` WebpageURL string `json:"webpage_url"` Categories []string `json:"categories"` Tags []string `json:"tags"` IsLive bool `json:"is_live"` LikeCount int `json:"like_count"` DislikeCount int `json:"dislike_count"` Channel string `json:"channel"` Track string `json:"track"` Artist string `json:"artist,omitempty"` Album string `json:"album,omitempty"` Creator string `json:"creator,omitempty"` AltTitle string `json:"alt_title"` Extractor string `json:"extractor"` WebpageURLBasename string `json:"webpage_url_basename"` ExtractorKey string `json:"extractor_key"` NEntries int `json:"n_entries"` Playlist string `json:"playlist"` PlaylistID string `json:"playlist_id"` PlaylistTitle string `json:"playlist_title"` PlaylistUploader string `json:"playlist_uploader"` PlaylistUploaderID string `json:"playlist_uploader_id"` PlaylistIndex int `json:"playlist_index"` Thumbnail string `json:"thumbnail"` DisplayID string `json:"display_id"` RequestedSubtitles string `json:"requested_subtitles"` RequestedFormats []Format `json:"requested_formats"` Format string `json:"format"` FormatID string `json:"format_id"` Width int `json:"width"` Height int `json:"height"` Resolution string `json:"resolution"` Fps int `json:"fps"` Vcodec string `json:"vcodec"` Vbr float64 `json:"vbr"` StretchedRatio string `json:"stretched_ratio"` Acodec string `json:"acodec"` Abr float64 `json:"abr"` Ext string `json:"ext"` License string `json:"license"` Chapters []Chapter `json:"chapters"` AutomaticCaptions map[string][]AutomaticCaption `json:"automatic_captions,omitempty"` Subtitles map[string]string `json:"subtitles,omitempty"` }
type Wrapper ¶
type Wrapper struct {
// contains filtered or unexported fields
}
func New ¶
func New(wrapperOptions WrapperOptions) (wrapper Wrapper, err error)
New returns a wrapper with specified WrapperOptions set
func (*Wrapper) GetPlaylistMetadata ¶
func (wrapper *Wrapper) GetPlaylistMetadata(url string) (playlistMetadata PlaylistMetadata, err error)
GetPlaylistMetadata using wrapperOptions provided in New
func (*Wrapper) GetVideoMetadata ¶
func (wrapper *Wrapper) GetVideoMetadata(url string) (videoMetadata VideoMetadata, err error)
type WrapperOptions ¶
type WrapperOptions struct { YoutubeDLBinary string // contains filtered or unexported fields }
type YoutubeDLError ¶
type YoutubeDLError struct {
// contains filtered or unexported fields
}
YoutubeDLError is specifically an error returned on stderr by youtube-dl
func (YoutubeDLError) Error ¶
func (youtubeDLError YoutubeDLError) Error() string
Click to show internal directories.
Click to hide internal directories.