mirror of
https://github.com/pikami/tiktok-dl.git
synced 2024-11-25 09:15:41 +00:00
26 lines
404 B
Go
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")
|
|
}
|