downloader

package
v0.0.0-...-41eba85 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDownloaderClient

func InitDownloaderClient() *http.Client

Types

type Downloader

type Downloader struct {
	// Request
	InitRequest     *http.Request
	DownloadRequest *http.Request
	// Response
	InitResponse     *http.Response
	DownloadResponse *http.Response
	// Config
	TokenConfig *extractor.DownloaderCookieConfig
	// contains filtered or unexported fields
}

func InitDownloader

func InitDownloader() *Downloader

InitDownloader initializes a new Downloader instance with necessary settings.

func (*Downloader) DownloadVideo

func (d *Downloader) DownloadVideo(URL string, FileName string, video_number int, wg *sync.WaitGroup) error

Initiating the download process.

func (*Downloader) FetchJSONAndSendToChannel

func (d *Downloader) FetchJSONAndSendToChannel(URL string, keyword string, offset int, wg *sync.WaitGroup, video_search_chan chan searchvideo.SearchVideoChanType) error

func (*Downloader) FetchVideoTitleAndUrl

func (d *Downloader) FetchVideoTitleAndUrl(URL string, wg *sync.WaitGroup) (string, string, error)

func (*Downloader) FetchVideoURLToBinary

func (d *Downloader) FetchVideoURLToBinary(URL string, wg *sync.WaitGroup) ([]byte, int64, error)

func (*Downloader) FetchVideoUrl

func (d *Downloader) FetchVideoUrl(URL string, wg *sync.WaitGroup) (string, error)

Jump to

Keyboard shortcuts

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