Open insurgencless opened 1 year ago
import subprocess import time import os
def upload_video():
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)
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
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)