WORK IN PROCESS | ESTIMATED COMPLETION DATE: 09/08/2024 This project is made with Python 3 and is comprised of 5 aspects.
- Youtube: This will utilize google APIs, VirusTotal API, and some OS libraries (such as moviepy) to download youtube videos, store metrics, check the downloaded file for viruses, stack videos, and log the videos metrics from Youtube.
- TikTok: Utilizing the TikTok Desktop App, can upload (and schedule upload) and log metrics from TikTok videos using OS libraries (since you cannot use TikTok's APIs unless you have an app)
- Database: With the metrics gathered from Youtube and Tiktok, this will all be stored in a database within various tables to be used to determine the best content (which videos get the most views, what hastags have the most traction, etc.
- Machine Learning: Uses the data collected from views of videos to determine rising hashtag popularity, optimal content, and more to maximize views per post.
- GUI: User Interface as a dashboard to view metrics, data analytics, and encourage decision making on their social media platforms
To get started you need to have python3 installed. If it is not the case you can download it here : https://www.python.org/downloads/
Make sure you've already git installed. Then you can run the following commands to get the scripts on your computer:
git clone https://github.com/lawolf8/sludge-content-automation
cd sludge-content-automation
The script only requires the requests
module, you can install it with this command:
pip install -r requirements.txt
You can copy the file Tiktok_uploader.py
in your project folder and use it like this:
from Tiktok_uploader import uploadVideo
session_id = "7a9f3c5d8f6e4b2a1c9d8e7f6a5b4c3d"
file = "my_video.mp4"
title = "MY SUPER TITLE"
tags = ["Funny", "Joke", "fyp"]
schedule_time = 1672592400
# Publish the video
uploadVideo(session_id, file, title, tags, verbose=True)
# Schedule the video
uploadVideo(session_id, file, title, tags, schedule_time, verbose=True)
session_id
: Your TikTok sessionid cookie.file
: The path to the video you want to upload.title
: The title of your publication (without hashtags).tags
: The list of hashtags you want to add to your post (without#
symbol). May be empty list[]
.schedule_time
: The timestamp (in seconds) at which you want to schedule your video.
Note that you cannot schedule a video more than 10 days in advance.
Note that your TikTok sessionid cookie needs to be updated every 2 months.
usage: Tiktok_uploader.py [-h] -i SESSION_ID -p PATH -t TITLE [--tags [TAGS ...]] [-s SCHEDULE_TIME]
options:
-h, --help show this help message and exit
-i SESSION_ID, --session_id SESSION_ID
Tiktok sessionid cookie
-p PATH, --path PATH Path to video file
-t TITLE, --title TITLE
Title of the video
--tags [TAGS ...] List of hashtags for the video
-s SCHEDULE_TIME, --schedule_time SCHEDULE_TIME
schedule timestamp for video upload
The session_id
, path
and title
fields are required.