Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DownloadInfo ¶
type DownloadInfo struct {
VideoID string `json:"video_id"`
Avid int64 `json:"avid"`
Cid int64 `json:"cid"`
Qn int64 `json:"qn"`
Length int64 `json:"length"` // 视频时长
Size int64 `json:"size"` // 文件大小
Url string `json:"url"`
Format string `json:"format"`
}
func GetDownloadInfoByAidCid ¶
func GetDownloadInfoByAidCid(videoId string, avid, cid int64) (*DownloadInfo, error)
type UrlProcessor ¶
type UrlProcessor struct {
// contains filtered or unexported fields
}
func (*UrlProcessor) CheckArgs ¶
func (p *UrlProcessor) CheckArgs() error
CheckArgs check if video id legal
func (*UrlProcessor) QueryAidCids ¶
func (p *UrlProcessor) QueryAidCids() error
QueryAidCids get every clip's aid, cid
type VideoDownloader ¶
type VideoDownloader struct {
// contains filtered or unexported fields
}
func NewVideoDownloader ¶
func NewVideoDownloader(info *DownloadInfo, out *os.File) *VideoDownloader
func (*VideoDownloader) Download ¶
func (d *VideoDownloader) Download() error
func (*VideoDownloader) DownloadFragment ¶
func (d *VideoDownloader) DownloadFragment(frag *VideoFragment) ([]byte, error)
type VideoFragment ¶
VideoFragment download video in parallel
type VideoInfo ¶
type VideoInfo struct {
VideoID string `json:"video_id"` // video id, av/BV
Avid int64 `json:"avid"`
Cid int64 `json:"cid"`
Title string `json:"title"`
Page int64 `json:"page"` // page no
Duration int64 `json:"duration"` // length in seconds
PartName string `json:"part_name"` // part name
}
func GetVideoInfosById ¶
GetVideoInfosById get videos id infomation by id
Click to show internal directories.
Click to hide internal directories.