Documentation ¶
Index ¶
- func CreateDirIfNotExist(dir string) (err error)
- func DownloadAvatar(user tiktokgo.TiktokUser) (err error)
- func DownloadItem(item tiktokgo.TiktokItem) (err error)
- func DownloadItemByUrl(itemUrl string) (err error)
- func DownloadItemByUsernameVideoId(username, videoId string) (err error)
- func DownloadUserPageNextData(username string) (err error)
- func GetRFC3339Time(timestamp int64) string
- func PrintTiktokUser(user tiktokgo.TiktokUser)
- func SaveItemBytes(url, localFilePath string, headers, cookies map[string]string) (err error)
- func SetDefaultDownloadDir(s string)
- func StripQueryString(inputUrl string) string
- func UserAvatarFilePath(user tiktokgo.TiktokUser) string
- func UserDir(user tiktokgo.TiktokUser) string
- func UserFilenameString(user tiktokgo.TiktokUser) string
- func UserItemFilePath(item tiktokgo.TiktokItem) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDirIfNotExist ¶
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 ¶
DownloadItemByUrl downloads video item given the the URL of the video item.
func DownloadItemByUsernameVideoId ¶
DownloadItemByUsernameVideoId downloads the video item given the username (@ not included) and video id in the item URL.
func DownloadUserPageNextData ¶
DownloadUserPageNextData downloads larger user profile pic and video items in the __NEXT_DATA__ of user page HTML.
func GetRFC3339Time ¶
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 ¶
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 ¶
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.