youtube

package module
v0.0.0-...-8f0ebae Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2021 License: MIT Imports: 14 Imported by: 0

README

前言

因为vpn不稳定的原因,想从UTOB下载机器学习的视频离线观看,却发现找不到满足我要求的程式。 于是根据其它流行的项目进行了大改,才有了这个版本。

它包括以下功能:

  • 可以下载单个视频或者整个专辑
  • 会自动下载zh,en字幕
  • 显示每文件下载速度及进度

使用方法

单个文件

  youtube.exe https://www.youtube.com/watch?v=N1vOgolbjSc 

进度快照

0/1 0 (4%) - 258KB/s Support Vector Machines A Visual Explanation with Sample Python Code

播放列表

 youtubedr.exe https://www.youtube.com/playlist?list=PLQVvvaa0QuDfKTOs3Keq_kaG2P55YRn5v 

进度快照

0/5 0 (3%) - 58KB/s Regression Features and Labels - Practical Machine Learning Tutorial with Python p.3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SubtilesDL

type SubtilesDL struct {
	// contains filtered or unexported fields
}

func NewSubtiteDL

func NewSubtiteDL(lang ...string) SubtilesDL

func (*SubtilesDL) Do

func (st *SubtilesDL) Do(fileName string, info SubtitlesInfo) error

func (*SubtilesDL) Download

func (st *SubtilesDL) Download(subtitls Subtitls) error

type SubtitlesContent

type SubtitlesContent struct {
	Start   float64 `xml:"start,attr"`
	Duaring float64 `xml:"dur,attr"`
	Text    string  `xml:",innerxml"`
}

type SubtitlesInfo

type SubtitlesInfo struct {
	BaseUrl      string `json:"baseUrl"`
	LanguageCode string `json:"languageCode"`
}

type Subtitls

type Subtitls struct {
	SubtitlesInfo []SubtitlesInfo
	// contains filtered or unexported fields
}

type Transcript

type Transcript struct {
	Text []SubtitlesContent `xml:"text"`
}

type VideoInfo

type VideoInfo struct {
	ID            string
	Filename      string
	Url           string
	SubtitlesInfo []SubtitlesInfo
}

type Youtube

type Youtube struct {
	StreamList []stream

	VideoInfoList []VideoInfo

	DownloadPercent chan int64
	// contains filtered or unexported fields
}

func NewYoutube

func NewYoutube(debug bool) *Youtube

func (*Youtube) StartDownload

func (y *Youtube) StartDownload(url string, destPath string) error

Directories

Path Synopsis
* * * parallel download files * downloading with progress info and retry until completed * zssty2010@gmail.com
* * * parallel download files * downloading with progress info and retry until completed * zssty2010@gmail.com

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL