This script automates the process of uploading videos to TikTok using the tiktok-uploader
package and Selenium.
- Python 3.x
tiktok-uploader
package: Installed viapip install -r requirements.txt
- Selenium: Installed via
pip install -r requirements.txt
- Appropriate WebDriver: Download the WebDriver for your browser (e.g., ChromeDriver for Chrome) and place it in your system's PATH.
- Cookies.txt file:
- Install the "Get cookies.txt" extension for your browser.
- Navigate to TikTok and log in to your account.
- Use the extension to export your cookies to a file named
cookies.txt
and place it inside the script's folder.
- Run
pip install -r requirements.txt
to install the required packages. - Place your cookies.txt file in the script's folder. See the Prerequisites section for more information.
- Place your video file in the script's folder and rename accordingly.
- Run the script:
python tiktok_uploader.py
- The script assumes your video files are in a supported format (e.g., MP4).
- You may need to adjust the script's code to match your specific needs, such as modifying video descriptions or hashtags.
- It's recommended to use Google Chrome as your Selenium browser to minimize the risk of TikTok bot detection.
This script is provided for educational purposes only. Use it responsibly and be aware of TikTok's terms of service.