MiniGlome / Tiktok-uploader

Python3 script to upload and schedule TikTok videos
187 stars 25 forks source link

how to automatically upload every # secounds #11

Open insurgencless opened 1 year ago

insurgencless commented 1 year ago

put this in vs code .py file

import subprocess import time import os

def upload_video():

Change the current working directory to the Tiktok-uploader directory

os.chdir('C:\\Users\\example\\Tiktok-uploader')

# Execute the Tiktok uploader command change values
command = 'python3 Tiktok_uploader.py -i 7a9f3c5d8f6e4b2a1c9d8e7f6a5b4c3d -p my_video.mp4 -t "MY SUPER TITLE" --tags Funny Joke Fyp'
subprocess.run(command, shell=True)

def run_upload_scheduler(interval): while True: upload_video() time.sleep(interval)

if name == 'main': interval_seconds = 10 # change value run_upload_scheduler(interval_seconds)