Documentation ¶
Index ¶
- Variables
- func Captions(videoId string) (captions []*youtube.Caption, err error)
- func Download(url string, options ...ReqOptions) (resp *http.Response, err error)
- func DownloadAndMergeCaption(videoId, mainId, mainTlang, secondaryId, secondaryTlang string) (path string, err error)
- func DownloadCaption(videoId string, captionId string, tlang string) (fpath string, err error)
- func DownloadInfo(videoId string, no int, kind string) (fileName, url string, err error)
- func DownloadToLocalFile(reader io.Reader, fileName string) (path string, err error)
- func InsertComment(nick string, content string, addr string) (err error)
- func ListComment(pageNo, pageSize string) (comments []*model.Comment, err error)
- func SetDownloadPath(path string)
- func Video(videoUrl string) (video *model.Video, err error)
- func VideoInfo(videoId string, kind string) (video *model.Video, err error)
- type ReqOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrDownloadFailed = errors.New("download failed")
)
Functions ¶
func DownloadAndMergeCaption ¶
func DownloadAndMergeCaption(videoId, mainId, mainTlang, secondaryId, secondaryTlang string) (path string, err error)
download two captions and merge them. return the filepath in local fs.
func DownloadCaption ¶
Download caption and return it's path in local filesystem.
func DownloadInfo ¶
func DownloadToLocalFile ¶
func SetDownloadPath ¶
func SetDownloadPath(path string)
Types ¶
type ReqOptions ¶
Click to show internal directories.
Click to hide internal directories.