tiktokdl

package
v0.0.0-...-0d125b7 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2022 License: Unlicense Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDirIfNotExist

func CreateDirIfNotExist(dir string) (err error)

CreateDirIfNotExist creates dir if not exist.

func DownloadAvatar

func DownloadAvatar(user tiktokgo.TiktokUser) (err error)

DownloadAvatar downloads user's larger avatar (profile) photo.

func DownloadItem

func DownloadItem(item tiktokgo.TiktokItem) (err error)

DownloadItem downloads user's tiktok video.

func DownloadItemByUrl

func DownloadItemByUrl(itemUrl string) (err error)

DownloadItemByUrl downloads video item given the the URL of the video item.

func DownloadItemByUsernameVideoId

func DownloadItemByUsernameVideoId(username, videoId string) (err error)

DownloadItemByUsernameVideoId downloads the video item given the username (@ not included) and video id in the item URL.

func DownloadUserPageNextData

func DownloadUserPageNextData(username string) (err error)

DownloadUserPageNextData downloads larger user profile pic and video items in the __NEXT_DATA__ of user page HTML.

func GetRFC3339Time

func GetRFC3339Time(timestamp int64) string

GetRFC3339Time returns RFC3339 string given the unix time (seconds from January 1st, 1970 at UTC)

func PrintTiktokUser

func PrintTiktokUser(user tiktokgo.TiktokUser)

PrintTiktokUser prints information of TikTok user.

func SaveItemBytes

func SaveItemBytes(url, localFilePath string, headers, cookies map[string]string) (err error)

SaveItemBytes makes HTTP GET request to the given URL and saves the content to local file.

func SetDefaultDownloadDir

func SetDefaultDownloadDir(s string)

SetDefaultDownloadDir sets the directory which saves the downloaded files.

func StripQueryString

func StripQueryString(inputUrl string) string

StripQueryString removes the query string in the URL.

func UserAvatarFilePath

func UserAvatarFilePath(user tiktokgo.TiktokUser) string

UserAvatarFilePath returns the file path of saved file of user avatar photo.

func UserDir

func UserDir(user tiktokgo.TiktokUser) string

UserDir returns default directory path for given user.

func UserFilenameString

func UserFilenameString(user tiktokgo.TiktokUser) string

UserFilenameString returns user string which is used in the file name of downloaded files.

func UserItemFilePath

func UserItemFilePath(item tiktokgo.TiktokItem) string

UserItemFilePath returns the file path of saved file of video item.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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