2020-01-19 15:54:16 +00:00
# TikTok-DL
[![Go Report Card ](https://goreportcard.com/badge/github.com/pikami/tiktok-dl )](https://goreportcard.com/report/github.com/pikami/tiktok-dl)
2020-04-09 16:53:45 +01:00
[![tiktok-dl_CI ](https://github.com/pikami/tiktok-dl/workflows/tiktok-dl_CI/badge.svg?branch=master )](https://github.com/pikami/tiktok-dl/actions)
2020-01-19 15:54:16 +00:00
A simple tiktok video downloader written in go
2020-05-02 07:48:13 +01:00
```diff
- This tool is not working currenly, I will revive it in the future when I have some free time
```
2020-05-02 07:46:43 +01:00
2020-04-09 16:10:33 +01:00
## Basic usage examples
2020-01-19 16:24:07 +00:00
Download the executable from `https://github.com/pikami/tiktok-dl/releases` \
2020-04-09 16:10:33 +01:00
You can download all videos from user by running `./tiktok-dl TIKTOK_USERNAME` \
You can download single video by running `./tiktok-dl VIDEO_URL` \
You can download items listed in a text file by running `./tiktok-dl -batch-file path/to/items.txt`
2020-01-19 15:54:16 +00:00
2020-04-09 16:10:33 +01:00
## Usage Manual
```
Usage: tiktok-dl [OPTION]... TARGET
or: tiktok-dl [OPTION]... -batch-file BATCH_FILE
In the 1st form, download given `TARGET` .
In the 2nd form, download all targets listed in given `BATCH_FILE` .
```
2020-01-19 16:24:07 +00:00
2020-01-19 15:54:16 +00:00
## Available options
2020-03-22 00:10:24 +00:00
* `-archive` - Download only videos not listed in the archive file. Record the IDs of all downloaded videos in it.
2020-04-09 16:10:33 +01:00
* `-batch-file some_file` - File containing URLs/Usernames to download, one value per line. Lines starting with '#', are considered as comments and ignored.
2020-01-30 16:59:34 +00:00
* `-deadline` - Sets the timout for scraper logic in seconds (used as a workaround for context deadline exceeded error) (default 1500)
2020-03-22 00:10:24 +00:00
* `-debug` - enables debug mode
2020-04-09 16:10:33 +01:00
* `-fail-log some_file` - Write failed items to log file
2020-02-24 22:56:19 +00:00
* `-json` - Returns whole data, that was scraped from TikTok, in json
* `-limit` - Sets the max count of video that will be downloaded (default infinity)
2020-03-22 00:10:24 +00:00
* `-metadata` - Write video metadata to a .json file
* `-output some_directory` - Output path (default "./downloads")
2020-04-09 16:53:45 +01:00
* `-quiet` - Suppress output
2020-01-19 15:54:16 +00:00
2020-04-09 16:10:33 +01:00
## Build instructions
1. Clone this repository
2. Run `go build` to build the executable.
2020-01-19 15:54:16 +00:00
## Acknowledgments
2020-01-24 17:14:52 +00:00
This software uses the **chromedp** for web scraping, it can be found here: https://github.com/chromedp/chromedp \
2020-01-24 17:02:50 +00:00
For releases the JS code is minified by using **terser** toolkit, it can be found here: https://github.com/terser/terser