Documentation ¶
Index ¶
- func Caption(url, refer, fileName, ext string) error
- func Download(v Data, refer string, chunkSizeMB int) error
- func LogKeyValue(key string, value string)
- func Save(urlData URL, refer, fileName string, chunkSizeMB int) error
- type Aria2Input
- type Aria2RPCData
- type Data
- type Stream
- type URL
- type VideoByQuality
- type VideoResp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogKeyValue ¶
Types ¶
type Aria2Input ¶
type Aria2Input struct { // The file name of the downloaded file Out string `json:"out"` // For a simple download, only add headers Header []string `json:"header"` }
Aria2Input options for `aria2.addUri` https://aria2.github.io/manual/en/html/aria2c.html#id3
type Aria2RPCData ¶
type Aria2RPCData struct { // More info about RPC interface please refer to // https://aria2.github.io/manual/en/html/aria2c.html#rpc-interface JSONRPC string `json:"jsonrpc"` ID string `json:"id"` // For a simple download, only inplemented `addUri` Method string `json:"method"` // secret, uris, options Params [3]interface{} `json:"params"` }
Aria2RPCData json RPC 2.0 for Aria2
type Data ¶
type Data struct { Site string `json:"site"` Title string `json:"title"` Type string `json:"type"` // each stream has it's own URLs and Quality Streams map[string]Stream `json:"streams"` // Err is used to record whether an error occurred when extracting data. // It is used to record the error information corresponding to each url when extracting the list data. // NOTE(iawia002): err is only used in Data list Err error `json:"-"` // URL is used to record the address of this download URL string `json:"url"` // contains filtered or unexported fields }
Data data struct for video information
type Stream ¶
type Stream struct { // [URL: {URL, Size, Ext}, ...] // Some video files have multiple fragments // and support for downloading multiple image files at once URLs []URL `json:"urls"` Quality string `json:"quality"` // total size of all urls Size int64 `json:"size"` // contains filtered or unexported fields }
Stream data struct for each stream
type VideoByQuality ¶
Click to show internal directories.
Click to hide internal directories.