mirror of
https://github.com/pikami/tiktok-dl.git
synced 2024-11-26 01:35:42 +00:00
27 lines
714 B
Go
27 lines
714 B
Go
package client
|
|
|
|
import (
|
|
models "../models"
|
|
config "../models/config"
|
|
"fmt"
|
|
)
|
|
|
|
// GetUserUploads - Get all uploads marked with given hashtag
|
|
func GetHashtagUploads(hashtagURL string) ([]models.Upload, error) {
|
|
jsMethod := fmt.Sprintf("bootstrapIteratingVideos(%d)", config.Config.Limit)
|
|
actionOutput, err := executeClientAction(hashtagURL, jsMethod)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return models.ParseUploads(actionOutput), nil
|
|
}
|
|
|
|
func GetHashtagUploadsJson(hashtagURL string) (string, error) {
|
|
jsMethod := fmt.Sprintf("bootstrapIteratingVideos(%d)", config.Config.Limit)
|
|
actionOutput, err := executeClientAction(hashtagURL, jsMethod)
|
|
if err != nil {
|
|
return "", err
|
|
}
|
|
return actionOutput, nil
|
|
}
|