Documentation ¶
Overview ¶
Edited from annie
Edited from annie
Index ¶
- Constants
- func Cookies(v url.Values) string
- func DownloadVideo(videoData VideoData, vData DownloadVideoRequest, basePath, cookies string, ...) error
- func GetCookiesString(link string) string
- func GetUserFavoriteListReport(mid string, currentUser bool) string
- func GetUserMID(cookies string) string
- func IterateFavoriteList(mid string, cookies string, callback func(key, value string, data interface{}))
- func SaveFile(urlData VideoURL, fName, fPath, cookies string, pg *utils.Progress) error
- func TestFavoriteList() bool
- func TestFavoriteListItem() bool
- func TestLoginInfo() bool
- func TestLoginQR() bool
- func TestMainSite() bool
- func TestPage(url string) bool
- func TestSpace() bool
- func TestVideoPage() bool
- type DownloadVideoRequest
- type FavoriteListItem
- type FavoriteListItemDetail
- type FavoriteListItemVideo
- type MIDInfo
- type MIDResponse
- type MySpaceResponse
- type OwnerUser
- type QRCode
- type RequestVideoPage
- type VideoData
- type VideoDimension
- type VideoPage
- type VideoPageList
- type VideoStream
- type VideoURL
Constants ¶
View Source
const BrokenVideoCover = "http://i0.hdslb.com/bfs/archive/be27fd62c99036dce67efface486fb0a88ffed06.jpg"
Variables ¶
This section is empty.
Functions ¶
func DownloadVideo ¶ added in v1.2.0
func GetCookiesString ¶
func GetUserMID ¶
func IterateFavoriteList ¶
func TestFavoriteList ¶ added in v1.2.0
func TestFavoriteList() bool
func TestFavoriteListItem ¶ added in v1.2.0
func TestFavoriteListItem() bool
func TestLoginInfo ¶ added in v1.2.0
func TestLoginInfo() bool
func TestLoginQR ¶ added in v1.2.0
func TestLoginQR() bool
func TestMainSite ¶ added in v1.2.0
func TestMainSite() bool
func TestVideoPage ¶ added in v1.2.0
func TestVideoPage() bool
Types ¶
type DownloadVideoRequest ¶ added in v1.2.0
type DownloadVideoRequest struct { Title string `json:"title"` FavTitle string `json:"fav_title"` Aid string `json:"aid"` Page RequestVideoPage `json:"page"` }
type FavoriteListItem ¶
type FavoriteListItemDetail ¶ added in v1.2.0
type FavoriteListItemDetail struct { MediaID int `json:"media_id"` FID int `json:"fid"` MID int `json:"mid"` Name string `json:"name"` MaxCount int `json:"max_count"` CurrentCount int `json:"cur_count"` AttenCount int `json:"atten_count"` Favoured int `json:"favoured"` State int `json:"state"` Ctime int `json:"ctime"` Mtime int `json:"mtime"` Cover []favoriteListItemCover `json:"cover"` }
func GetFavoriteList ¶
func GetFavoriteList(mid string, cookies string) ([]FavoriteListItemDetail, error)
type FavoriteListItemVideo ¶
type FavoriteListItemVideo struct { AID int `json:"aid"` Videos int `json:"videos"` TID int `json:"tid"` TName string `json:"tname"` Copyright int `json:"copyright"` Cover string `json:"pic"` Title string `json:"title"` PubDate int `json:"pubdate"` CTime int `json:"ctime"` Description string `json:"desc"` State int `json:"state"` Attribute int `json:"attribute"` Duration int `json:"duration"` Owner OwnerUser `json:"owner"` Stat favoriteListItemVideoStat `json:"stat"` Dynamic string `json:"dynamic"` CID int `json:"cid"` Dimension favoriteListItemVideoDimension `json:"dimension"` FavoriteTime int `json:"fav_at"` PlayNum string `json:"play_num"` HighlightTitle string `json:"highlight_title"` }
func GetFavoriteListItems ¶
func GetFavoriteListItems(mid, fid, pn, cookies string) ([]FavoriteListItemVideo, error)
type MIDInfo ¶
type MIDInfo struct { Mid int `json:"mid"` Name string `json:"name"` Sex string `json:"sex"` Face string `json:"face"` Sign string `json:"sign"` Rank int `json:"rank"` Level int `json:"level"` Jointime int `json:"jointime"` Moral int `json:"moral"` Silence int `json:"silence"` Birthday string `json:"birthday"` Coins float64 `json:"coins"` FansBadge bool `json:"fans_badge"` Official officialStatus `json:"official"` Vip vipStatus `json:"vip"` IsFollowed bool `json:"is_followed"` TopPhoto string `json:"top_photo"` Theme interface{} `json:"theme"` }
func GetMIDInfo ¶
type MIDResponse ¶
type MySpaceResponse ¶
type QRCode ¶
func GetLoginQRCode ¶
func GetLoginQRCode() QRCode
type RequestVideoPage ¶ added in v1.2.0
type VideoData ¶ added in v1.2.0
type VideoData 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]VideoStream `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 VideoData list Err error `json:"-"` // VideoURL is used to record the address of this download URL string `json:"url"` // contains filtered or unexported fields }
func EmptyVideoData ¶ added in v1.2.0
func ExtractVideo ¶ added in v1.2.0
func ExtractVideo(data DownloadVideoRequest, cookies string) VideoData
提取 bilibili 视频
type VideoDimension ¶ added in v1.2.0
type VideoPage ¶
type VideoPage struct { CID int `json:"cid"` Page int `json:"page"` From string `json:"from"` Part string `json:"part"` Duration int64 `json:"duration"` Vid string `json:"vid"` Weblink string `json:"weblink"` Dimension VideoDimension `json:"dimension"` }
func GetVideoPages ¶
type VideoPageList ¶ added in v1.2.0
type VideoStream ¶ added in v1.2.0
type VideoStream struct { // [VideoURL: {VideoURL, Size, Ext}, ...] // Some video files have multiple fragments // and support for downloading multiple image files at once URLs []VideoURL `json:"urls"` Quality string `json:"quality"` // total size of all urls Size int64 `json:"size"` // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.