extractor

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateValidVideoURL

func CreateValidVideoURL(inputURL string) string

func ExtractTextWithPattern

func ExtractTextWithPattern(htmlStr, pattern string) string

func ExtractTitleString

func ExtractTitleString(htmlStr string) string

func GetTitleFromHTML

func GetTitleFromHTML(html string) (string, error)

Extracting the string from the Title tag of the HTML element.

func GetVideoSizeFromResponse

func GetVideoSizeFromResponse(header *http.Header) (int64, error)

Extracting the Content-Length from the requested result and returning it as an integer.

Types

type DownloaderCookieConfig

type DownloaderCookieConfig struct {
	TT_CHAIN_TOKEN string `json:"TT_CHAIN_TOKEN"`
	TT_CSRF_TOKEN  string `json:"TT_CSRF_TOKEN"`
	TTWID          string `json:"TTWID"`
}

func (*DownloaderCookieConfig) InitDownloaderRequestConfigs

func (dcc *DownloaderCookieConfig) InitDownloaderRequestConfigs() (*DownloaderCookieConfig, error)

Opening the config.json file and placing the cookie string into the struct.

Jump to

Keyboard shortcuts

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