# TikTok hashtag analysis toolset
The tool helps to download posts and videos from tiktok for a given set of hashtags. It uses tiktok-scraper (https://github.com/drawrowfly/tiktok-scraper) to download the posts and videos.
## Pre-requisites
1. Make sure you have python 3.8 or later version installed.
2. Download and install TikTok scraper: https://github.com/drawrowfly/tiktok-scraper
### Options for running run_downloader.py
### Data organization
data folder contains all the downloaded data as shown in the pic above.
1. the log folder contains log.json which records the total number of downloaded posts and videos for the hashtags against the time stamp of when the script is run.
2. the ids folder contains two files post_ids.json and video_ids.json that records the ids of the downloaded posts and videos for each hashtag.
3. Each hashtag has a folder with two subfolders posts and videos that store posts and videos respectively. The posts are stored in the data.json file in the posts folder, and videos are stored as the .mp4 files in the videos folder.
### Post download example
Run the run_downloader.py with the following option:
python3 run_downloader.py --h london paris newyork -p