tiktok-dl/main.go

28 lines
616 B
Go
Raw Normal View History

2020-01-19 02:11:53 +00:00
package main
import (
2020-04-12 01:22:00 +01:00
config "github.com/pikami/tiktok-dl/models/config"
workflows "github.com/pikami/tiktok-dl/workflows"
2020-01-19 02:11:53 +00:00
)
func main() {
config.GetConfig()
url := config.Config.URL
batchFilePath := config.Config.BatchFilePath
scrapedDataFilePath := config.Config.ScrapedDataFilePath
// Batch file
if workflows.CanUseDownloadBatchFile(batchFilePath) {
workflows.DownloadBatchFile(batchFilePath)
return
}
2020-01-19 02:11:53 +00:00
// Scraped data file
if workflows.CanUseDownloadScrapedData(scrapedDataFilePath) {
workflows.DownloadScrapedData(scrapedDataFilePath)
return
}
workflows.StartWorkflowByParameter(url)
2020-01-19 02:11:53 +00:00
}