This project automates the process of uploading videos to Instagram, TikTok, YouTube, Snapchat, X and Linkedin using Python and Selenium.
Python: Make sure you have Python installed. You can download it from here.
Clone the repository:
git clone https://github.com/EdwardZehuaZhang/Tiktok-Instagram-Youtube-Snapchat-X-Linkedin-Video-Uploader.git
Install the required Python packages:
pip install fake_useragent undetected_chromedriver selenium pywinauto
Config Class: Replace the placeholders in the Config
class with your own usernames, passwords, and file paths.
class Config:
video_path = "Your video path"
description_file_path = "Your file descript path, txt btw"
instagram_cookies_file = "instagram_cookies.pkl"
tiktok_cookies_file = "tiktok_cookies.pkl"
youtube_cookies_file = "youtube_cookies.pkl"
x_cookies_file = "x_cookies.pkl"
linkedin_cookies_file = "linkedin_cookies.pkl"
snapchat_username = "ur_snap_username"
snapchat_password = "ur_snap_password"
instagram_username = "ur_insta_username"
instagram_password = "ur_insta_username"
......
Cookie Extraction: Run the script to login and save cookies for each platform. This will generate the required cookie files (.pkl
):
python extract_cookies.py
Create a description file for your video with the following structure:
Example:
My Video Title
This is a description of the video.
#tag1, #tag2, #tag3
Run the main script to upload your video to all platforms:
python main.py
fake_useragent
library to generate random user agents to avoid detection. However it is recommended that one uses their own user agent in (tiktok_upload.py
) as for anti-automation.pkl
files for seamless login.undetected_chromedriver
library is used to bypass anti-bot mechanisms.