Documentation ¶
Index ¶
- Variables
- func ExtractM3u8BaseURL(url string) (string, error)
- func ExtractTvidPartidFromURL(url string) (string, string, error)
- func FetchLinkContent(url string) ([]byte, error)
- func FetchLinkContentWithRetry(url string) ([]byte, error)
- func SanitizeFileName(fn string) string
- func StructToURLValues(i interface{}) (values url.Values)
Constants ¶
This section is empty.
Variables ¶
View Source
var RetryTimes = 10
RetryTimes is the number of times that download
View Source
var UserToken = "" /* 205-byte string literal not displayed */
UserToken is the session shared among all devices. TODO(#3): replace this hard-coded one flesh token from logging in.
View Source
var VerboseMode = false
VerboseMode shows whether the program runs under verbose mode.
Functions ¶
func ExtractM3u8BaseURL ¶
ExtractM3u8BaseURL extracts the base URL for *.ts videos.
func ExtractTvidPartidFromURL ¶
ExtractTvidPartidFromURL extracts the IDs.
func FetchLinkContent ¶
FetchLinkContent downloads the link content to variable in memory.
func FetchLinkContentWithRetry ¶
FetchLinkContentWithRetry downloads the link content to variable in memory with retry.
func SanitizeFileName ¶
SanitizeFileName replaces illegal characters in the file.
func StructToURLValues ¶
StructToURLValues convert a struct to url.Values map.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.