Merge branch 'master' into master

This commit is contained in:
intracomof
2020-02-25 21:01:43 +02:00
committed by GitHub
10 changed files with 111 additions and 39 deletions

View File

@@ -7,10 +7,13 @@ import (
)
// GetUserUploads - Get all uploads by user
func GetUserUploads(username string) []models.Upload {
jsMethod := fmt.Sprintf("bootstrapIteratingVideos(%d)", config.Config.Limit)
actionOutput := executeClientAction(`https://www.tiktok.com/@`+username, jsMethod)
return models.ParseUploads(actionOutput)
func GetUserUploads(username string) ([]models.Upload, error) {
jsMethod := fmt.Sprintf("bootstrapIteratingVideos(%d)", config.Config.Limit)
actionOutput, err := executeClientAction(`https://www.tiktok.com/@`+username, jsMethod)
if err != nil {
return nil, err
}
return models.ParseUploads(actionOutput), nil
}
func GetUserUploadsJson(username string) string {