Skip to content

TatjanaChernenko/tiktok-analyzer

 
 

Repository files navigation

TikTok-Analyzer: A TikTok Video Scraping and Content Analysis Tool

Tiktok-Teller

Description

Search & download Tiktok videos by username and/or video tag, and analyze video contents. Transcribe video speech to text and perform NLP analysis tasks (e.g., keyword and topic discovery; emotion/sentiment analysis). Isolate audio signal and perform signal processing analysis tasks (e.g., pitch, prosody and sentiment analysis). Isolate visual stream and perform image tasks (e.g., object detection; face detection).


Python Toolkit


Installation & Use

Virtual Env

  • Clone or download .zip of tiktok-analyzer python package.
git clone https://github.com/kariemoorman/tiktok-analyzer.git
  • Create a virtual environment inside the tiktok-analyzer directory.
cd tiktok-analyzer && python3 -m venv .venv 
  • Activate virtual environment.
source .venv/bin/activate
  • Install package dependencies.
pip install -r requirements.txt
  • Execute tiktok-analyzer program.
python src/tiktok-analyzer.py

Docker Image

  • Clone or download .zip of tiktok-analyzer python package.
git clone https://github.com/kariemoorman/tiktok-analyzer.git
  • Build Docker image.
docker build -t tt-analyzer .
  • Run Docker image as container.
docker run --rm -ti tt-analyzer

Example Use Cases

Option 1: Download Tiktok Video.

Option 2: Transcribe Tiktok Video.

Option 3: Analyze Tiktok Video.


Repository Contents

  • TikTok Video Scrapers

    • tiktok_user_video_scraper.py
      Choose either Selenium or Pyppeteer to dynamically scrape TikTok videos for one or more Tiktok usernames.
      E.g., python3 tiktok_user_video_scraper.py <username> <username> -b pyppeteer -o csv

    • tiktok_tag_video_scraper.py Choose either Selenium or Pyppeteer to dynamically scrape TikTok videos for one or more Tiktok tags.
      E.g., python3 tiktok_tag_video_scraper.py physics lhc -b pyppeteer -o csv

    • tiktok_video_metadata_scraper.py Export metadata from a Tiktok video.
      E.g., python3 tiktok_video_metadata_scraper.py <tiktok_video_url>

  • TikTok Video Downloader

    • tiktok_downloader.py Choose either Selenium or Pyppeteer to dynamically download one or more Tiktok videos.
      E.g., python3 tiktok_downloader.py <tiktok_video_url> -b selenium -d firefox
  • TikTok Video Speech Transcriber

    • tiktok_video_to_text.py
      Choose either Google or OpenAI ASR model to transcribe Tiktok video (in mp4 format).
      E.g., python3 tiktok_video_to_text.py <path/to/video_filename.mp4> -m openai
  • TikTok Video Face Detection

    • face_detection.py
      Conduct face detection task on Tiktok video (in mp4 format).
      E.g., python3 face_detection.py <video.mp4> -o 'output/file/path'
  • TikTok Sentiment Analysis

    • sentiment_analysis.py
      Conduct sentiment analysis tasks on Tiktok video transcription data.
      E.g., python3 sentiment_analysis.py -t <document> -f 'output/file/path/filename.mp4/json'

License: GNU General Public License v3.0

About

TikTok video scraping and multimodal content analysis tool.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.7%
  • Dockerfile 1.3%