From b99e43f0d64d24c8f46c28eb8b5e5873d8e9e030 Mon Sep 17 00:00:00 2001 From: Joe Steele Date: Tue, 2 Jul 2024 16:25:12 -0400 Subject: [PATCH] tiktok --- social.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/social.py b/social.py index 04d017f..dc49ad3 100644 --- a/social.py +++ b/social.py @@ -1194,7 +1194,7 @@ def post_to_tiktok(title, content, headers, date, rating, address, picslist, loc # If you want to schedule your video, replace 'schedule_timestamp' with the Unix timestamp. # Leave it as None if you want to upload immediately. schedule_time = None # or Unix timestamp (e.g., 1672592400) - pics = ((picslist[1:-1]).replace("'","")).split(",") + pics = ((picslist[1:-1]).replace("'","").replace(" ","")).split(",") if any(element.endswith("montage.mp4") for element in pics): for pic in pics: if 'montage.mp4' in pic: @@ -1273,8 +1273,8 @@ def post_to_tiktok(title, content, headers, date, rating, address, picslist, loc try: data2 = {'source_info':{'source':file_path}} - response = requests.post('https://open.tiktokapis.com/v2/oauth/token/', headers=allheaders,\ - data=data2,timeout=env.request_timeout) + response = requests.post('https://open.tiktokapis.com/v2/oauth/token/,headers:',allheaders,\ + 'data:',data2,'timeout:',env.request_timeout) except BaseException as error: print(" An error occurred uploading video to TikTok:", type(error).__name__) return False