tiktok-dl/main.go
2020-01-21 23:46:30 +02:00

26 lines
404 B
Go

package main
import (
models "./models"
workflows "./workflows"
)
func main() {
models.GetConfig()
url := models.Config.URL
// Single video
if workflows.CanUseDownloadSingleVideo(url) {
workflows.DownloadSingleVideo(url)
return
}
// Tiktok user
if workflows.CanUseDownloadUser(url) {
workflows.DownloadUser(models.GetUsername())
return
}
panic("Could not recognise URL format")
}