tiktokautouploader 2.91__tar.gz → 2.95__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@ This document provides detailed information about the parameters and usage of th
7
7
  - **Parameter Explanations**: Provides detailed descriptions of each parameter, including the valid options and their effects.
8
8
  - **Initialization Info**: Details instances that occur during first run of function
9
9
  - **Important Notes**: Highlights important account recommendations and limitations related to TikTok accounts and scheduling.
10
- - **Supported Captchas**: Showcases the Captcha's the code is able to solve
10
+ - **Supported Captchas**: Showcases the Captchas the code is able to solve
11
11
  - **Runtime**: Provides an estimate of how much runtime is added by different parameters
12
12
  - **Example Usage**: Demonstrates a practical example of how to use the function.
13
13
 
@@ -38,7 +38,7 @@ This document provides detailed information about the parameters and usage of th
38
38
  - **`schedule`** (str, optional, default: None)
39
39
  - The time you want the video to be uploaded. The format should be `HH:MM`, and the minute (`MM`) must be a multiple of 5. The scheduled time must be at least 15 minutes later than the current local time (unless scheduling for a different day). The time should be in your local time zone.
40
40
 
41
- - **`day`** (int, optional, default: None) (requires time in `schedule` also)
41
+ - **`day`** (int, optional, default: None) (requires `schedule` != None)
42
42
  - If you want to schedule the video for a different day, this parameter specifies the day of the current month on which to upload the video. i.e: If current day is Sept 3rd, day=5 will upload video on Sept 5th
43
43
  - NOTE: You will also need to specify time of upload in `schedule` parameter or else `day` won't work
44
44
 
@@ -47,13 +47,13 @@ This document provides detailed information about the parameters and usage of th
47
47
  - If scheduling for the next month, you can only schedule within the first 5 days of the next month (as long as they are also within 10 days of the current date). i.e: If current day is Sept 30th, day=5 will upload on Oct 5th, 6 WILL NOT WORK.
48
48
 
49
49
  - **`copyrightcheck`** (bool, optional, default: `False`)
50
- - If set to `True`, the function will conduct a copyright check on TikTok before uploading. If the check fails, the video will be saved as a draft, and the code execution will stop.
50
+ - If set to `True`, the function will conduct a copyright check on TikTok before uploading. If the check fails, the code execution will stop.
51
51
 
52
- - **`suppressprint`** (bool, optional, default: `True`)
52
+ - **`suppressprint`** (bool, optional, default: `False`)
53
53
  - Suppresses print messages that indicate the progress of the video upload. It is recommended to set this to `False` when first running the code to see progress and ensure everything works correctly.
54
54
 
55
55
 
56
- ### 🛠️ Initialization Info
56
+ ## 🛠️ Initialization Info
57
57
 
58
58
  - **During FIRST RUN:**
59
59
 
@@ -64,11 +64,11 @@ This document provides detailed information about the parameters and usage of th
64
64
  - Runtime might be a 20-30 seconds longer than usual, this is due to libraries being built. Runtime should return to normal after first run
65
65
 
66
66
 
67
- ### 📝 Important Notes
67
+ ## 📝 Important Notes
68
68
 
69
69
  - **VERY IMPORTANT: TikTok Account Recommendations**:
70
70
  - It is recommended to have a TikTok account with at least a few weeks of history built up for the best results.
71
- - If you want to upload your video with TikTok sounds, your TikTok account MUST have the ability to save drafts; otherwise, you can just upload/schedule the video with copyright checks and trending hashtags
71
+ - If you want to upload your video with TikTok sounds, your TikTok account MUST have the ability to save drafts; otherwise, you can just upload/schedule the video with copyright checks and trending hashtags.
72
72
 
73
73
  - **Scheduling Limitations**:
74
74
  - The function allows scheduling up to 10 days in advance.
@@ -76,15 +76,22 @@ This document provides detailed information about the parameters and usage of th
76
76
 
77
77
  ## ⛔ Supported Captchas:
78
78
 
79
- - **Captcha solver currently works perfectly for Captcha's of type:**
79
+ ### Captcha solver currently supports Captchas of type:
80
80
  <p align="center">
81
- <img src="READMEimage/Captcha1.gif" alt="" width="200"/>
81
+ <img src="READMEimage/Captcha1.gif" alt="" width="250" loop=infinite/>
82
82
  </p>
83
83
 
84
84
  <p align="center">
85
- <img src="READMEimage/Captcha2.gif" alt="" width="200"/>
85
+ <img src="READMEimage/2ndCaptcha.gif" alt="" width="250" loop=infinite/>
86
86
  </p>
87
87
 
88
+ #### Note:
89
+ - These GIFs are just to showcase the project's ability to auto-solve captcha's, this entire process will take place 'under the hood', you will not see the captcha being solved.
90
+
91
+ - As far as I'm aware these captchas are the only types of captchas that you may encounter when trying to upload TikTok's, if you do encounter a different captcha, I highly encourage you to email me and let me know and I will try to increase the capabilities of this project to include those captcha's as well.
92
+
93
+ - To check what captcha shows up when you upload on your account just open this link while logged in to TikTok: https://www.tiktok.com/tiktokstudio/upload?from=upload&lang=en
94
+
88
95
  ## 🕰️ Runtime:
89
96
  **Total runtime depends on how long TikTok takes to upload your video to their servers, however, here are approximations on how much runtime is added by each parameter**
90
97
 
@@ -116,4 +123,4 @@ upload_tiktok(
116
123
  )
117
124
  ```
118
125
 
119
- For more details or if errors persist, please feel free to contact me at haziqmk123@gmail.com or on LinkedIn (on my github profile)
126
+ For more details or if errors persist, please feel free to contact me at haziqmk123@gmail.com or on LinkedIn (on my github profile)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: tiktokautouploader
3
- Version: 2.91
3
+ Version: 2.95
4
4
  Summary: Upload or schedule videos to TikTok with viral TikTok sounds and hashtags.
5
5
  Project-URL: Homepage, https://github.com/haziq-exe/TikTokAutoUploader
6
6
  Author-email: HAZIQ <haziqmk123@gmail.com>
@@ -31,13 +31,13 @@ Description-Content-Type: text/markdown
31
31
 
32
32
 
33
33
  <p align="center">
34
- <img src="READMEimage/Image.png" alt="" width="400"/>
34
+ <img src="READMEimage/READMEimg.png" alt="" width="150"/>
35
35
  </p>
36
36
 
37
37
  ## 🚀 Features
38
38
 
39
- - **🔐 Bypass/Auto Solve Captchas:** No more manual captcha solving; fully automated process!
40
- - **🎵 Use TikTok Sounds:** Seamlessly add popular TikTok sounds to your videos.
39
+ - **🔐 Bypass/Auto Solve Captchas:** No need to worry about any captchas interrupting the process, they'll be solved!
40
+ - **🎵 Use TikTok Sounds:** Go viral by seamlessly adding popular TikTok sounds to your videos.
41
41
  - **🗓 Schedule Uploads:** Upload videos at specific times or upto 10 days in advance with our scheduling feature.
42
42
  - **🔍 Copyright Check:** Ensure your video is safe from copyright claims before uploading.
43
43
  - **🏷 Add Working Hashtags:** Increase your reach by adding effective hashtags that actually work.
@@ -60,23 +60,22 @@ pip install tiktokautouploader
60
60
  - **Note:** The necessary JavaScript dependencies (`playwright`,`playwright-extra`, `puppeteer-extra-plugin-stealth`) will be AUTOMATICALLY installed the first time you run the function, so you don't need to install them manually. Make sure that `npm` (Node.js package manager) is available in your system's PATH.
61
61
 
62
62
 
63
- 2. **Browser Binaries:** If you don't have them already, you'll need to install the chromium browser binary for `playwright`.
63
+ 2. **Browser Binaries:** If you don't have them already, you'll need to install the browser binaries for `playwright`.
64
64
 
65
- To do so, just run the following command AFTER installing the package:
66
-
67
- ```bash
68
- python -m playwright install chromium
69
- ```
65
+ to do so, just run the following command AFTER installing the package:
66
+
67
+ ```bash
68
+ python -m playwright install
69
+ ```
70
70
 
71
71
 
72
72
  ## 📝 Quick-Start
73
73
 
74
- Here's how to upload a video to TikTok with hashtags using `tiktokautouploader`:
75
-
76
- NOTE: It is highly recommended you read DOCUMENTATION.md before using the library.
77
-
74
+ **NOTE:** It is highly recommended you read DOCUMENTATION.md before using the library.
78
75
  The first time you run the code, you will be prompted to log-in, this will only occur the first time the function is used. Check documentation for more info.
79
76
 
77
+ ## Upload with hashtags
78
+
80
79
  ```python
81
80
  from tiktokautouploader import upload_tiktok
82
81
 
@@ -116,6 +115,7 @@ upload_tiktok(video=video_path, description=description, hashtags=hashtags, copy
116
115
  - **Maximize your reach:** Add popular sounds and effective hashtags that work to boost visibility.
117
116
  - **Stay compliant:** Built-in copyright checks to avoid unforeseen takedowns.
118
117
  - **Convenient scheduling:** Post at the right time, even when you're away.
118
+ - **Much faster than manually uploading:** Drastically reduce the time you need to upload videos, just click one button and be done much quicker!
119
119
 
120
120
  ## 🛠 Dependencies
121
121
 
@@ -131,7 +131,7 @@ These will be automatically installed when you install the package.
131
131
 
132
132
  ## 👤 Author
133
133
 
134
- Created by **Haziq Khalid**. Feel free to reach out at [haziqmk123@gmail.com](mailto:haziqmk123@gmail.com) or my LinkedIn.
134
+ Created by **Haziq**. Feel free to reach out at [haziqmk123@gmail.com](mailto:haziqmk123@gmail.com)
135
135
 
136
136
  ## 📄 License
137
137
 
@@ -9,13 +9,13 @@
9
9
 
10
10
 
11
11
  <p align="center">
12
- <img src="READMEimage/Image.png" alt="" width="400"/>
12
+ <img src="READMEimage/READMEimg.png" alt="" width="150"/>
13
13
  </p>
14
14
 
15
15
  ## 🚀 Features
16
16
 
17
- - **🔐 Bypass/Auto Solve Captchas:** No more manual captcha solving; fully automated process!
18
- - **🎵 Use TikTok Sounds:** Seamlessly add popular TikTok sounds to your videos.
17
+ - **🔐 Bypass/Auto Solve Captchas:** No need to worry about any captchas interrupting the process, they'll be solved!
18
+ - **🎵 Use TikTok Sounds:** Go viral by seamlessly adding popular TikTok sounds to your videos.
19
19
  - **🗓 Schedule Uploads:** Upload videos at specific times or upto 10 days in advance with our scheduling feature.
20
20
  - **🔍 Copyright Check:** Ensure your video is safe from copyright claims before uploading.
21
21
  - **🏷 Add Working Hashtags:** Increase your reach by adding effective hashtags that actually work.
@@ -38,23 +38,22 @@ pip install tiktokautouploader
38
38
  - **Note:** The necessary JavaScript dependencies (`playwright`,`playwright-extra`, `puppeteer-extra-plugin-stealth`) will be AUTOMATICALLY installed the first time you run the function, so you don't need to install them manually. Make sure that `npm` (Node.js package manager) is available in your system's PATH.
39
39
 
40
40
 
41
- 2. **Browser Binaries:** If you don't have them already, you'll need to install the chromium browser binary for `playwright`.
41
+ 2. **Browser Binaries:** If you don't have them already, you'll need to install the browser binaries for `playwright`.
42
42
 
43
- To do so, just run the following command AFTER installing the package:
44
-
45
- ```bash
46
- python -m playwright install chromium
47
- ```
43
+ to do so, just run the following command AFTER installing the package:
44
+
45
+ ```bash
46
+ python -m playwright install
47
+ ```
48
48
 
49
49
 
50
50
  ## 📝 Quick-Start
51
51
 
52
- Here's how to upload a video to TikTok with hashtags using `tiktokautouploader`:
53
-
54
- NOTE: It is highly recommended you read DOCUMENTATION.md before using the library.
55
-
52
+ **NOTE:** It is highly recommended you read DOCUMENTATION.md before using the library.
56
53
  The first time you run the code, you will be prompted to log-in, this will only occur the first time the function is used. Check documentation for more info.
57
54
 
55
+ ## Upload with hashtags
56
+
58
57
  ```python
59
58
  from tiktokautouploader import upload_tiktok
60
59
 
@@ -94,6 +93,7 @@ upload_tiktok(video=video_path, description=description, hashtags=hashtags, copy
94
93
  - **Maximize your reach:** Add popular sounds and effective hashtags that work to boost visibility.
95
94
  - **Stay compliant:** Built-in copyright checks to avoid unforeseen takedowns.
96
95
  - **Convenient scheduling:** Post at the right time, even when you're away.
96
+ - **Much faster than manually uploading:** Drastically reduce the time you need to upload videos, just click one button and be done much quicker!
97
97
 
98
98
  ## 🛠 Dependencies
99
99
 
@@ -109,7 +109,7 @@ These will be automatically installed when you install the package.
109
109
 
110
110
  ## 👤 Author
111
111
 
112
- Created by **Haziq Khalid**. Feel free to reach out at [haziqmk123@gmail.com](mailto:haziqmk123@gmail.com) or my LinkedIn.
112
+ Created by **Haziq**. Feel free to reach out at [haziqmk123@gmail.com](mailto:haziqmk123@gmail.com)
113
113
 
114
114
  ## 📄 License
115
115
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "tiktokautouploader"
7
- version = "2.91"
7
+ version = "2.95"
8
8
  description = "Upload or schedule videos to TikTok with viral TikTok sounds and hashtags."
9
9
  readme = {file = "README.md", content-type = "text/markdown"}
10
10
  keywords = ["tiktok", "autoupload", "tiktokautoupload"]
@@ -36,7 +36,7 @@ tags = ["wheel"]
36
36
 
37
37
  [tool.hatch.metadata]
38
38
  name = "tiktokautouploader"
39
- version = "2.91"
39
+ version = "2.95"
40
40
  description = "Upload or schedule videos to TikTok with TikTok sounds and hashtags that work."
41
41
  readme = {file = "README.md", content-type = "text/markdown"}
42
42
  keywords = ["tiktok", "autoupload", "tiktokautoupload"]
@@ -9,7 +9,7 @@ from PIL import Image
9
9
  import sys
10
10
  import os
11
11
  import warnings
12
- warnings.filterwarnings("ignore")
12
+ warnings.simplefilter("ignore")
13
13
 
14
14
  def login_warning():
15
15
  print("NO COOKIES FILE FOUND, PLEASE LOG-IN WHEN PROMPTED")
@@ -38,6 +38,7 @@ def check_expiry():
38
38
  def run_javascript():
39
39
  js_file_path = pkg_resources.resource_filename(__name__, 'Js_assets/login.js')
40
40
  result = subprocess.run(['node', js_file_path], capture_output=True, text=True)
41
+ return result
41
42
 
42
43
  def install_js_dependencies():
43
44
  js_dir = pkg_resources.resource_filename(__name__, 'Js_assets')
@@ -46,6 +47,7 @@ def install_js_dependencies():
46
47
  if not os.path.exists(node_modules_path):
47
48
  print("JavaScript dependencies not found. Installing...")
48
49
  subprocess.run(['npm', 'install', 'playwright', 'playwright-extra', 'puppeteer-extra-plugin-stealth', '--silent'], cwd=js_dir, check=True)
50
+ subprocess.run(['npx', 'playwright', 'install', 'chromium'], cwd=js_dir, check=True)
49
51
  else:
50
52
  time.sleep(0.1)
51
53
 
@@ -86,11 +88,24 @@ def understood_Qs(question):
86
88
  'has strings': 'guitar',
87
89
  'oval and inflatable': 'football',
88
90
  'strumming': 'guitar',
89
- 'bounces on courts': 'basketball',
91
+ 'bounces': 'basketball',
90
92
  'musical instrument': 'guitar',
91
93
  'laces': 'football',
92
94
  'bands': 'guitar',
93
- 'leather': 'football'
95
+ 'leather': 'football',
96
+ 'leaves':'tree',
97
+ 'pages': 'book',
98
+ 'throwing': 'football',
99
+ 'tossed in a spiral': 'football',
100
+ 'spiky crown': 'pineapple',
101
+ 'pigskin': 'football',
102
+ 'photography': 'camera',
103
+ 'lens': 'camera',
104
+ 'grow': 'tree',
105
+ 'captures images': 'camera',
106
+ 'keeps doctors': 'apple',
107
+ 'crown': 'pineapple',
108
+ 'driven': 'car',
94
109
  }
95
110
 
96
111
  for key in understood_terms.keys():
@@ -116,8 +131,7 @@ def download_image(image_url):
116
131
 
117
132
  def run_inference_on_image_tougher(image_path, object):
118
133
 
119
- found_proper = False
120
- model = inference.get_model("captcha-2-6ehbe/1")
134
+ model = inference.get_model("captcha-2-6ehbe/2")
121
135
  results = model.infer(image=image_path)
122
136
 
123
137
  class_names = []
@@ -137,12 +151,9 @@ def run_inference_on_image_tougher(image_path, object):
137
151
  if classes == class_to_click:
138
152
  bounding_box.append(bounding_boxes[i])
139
153
 
140
- if len(bounding_box) == 2:
141
- found_proper = True
142
154
 
143
- found_proper = True
144
155
 
145
- return bounding_box, found_proper
156
+ return bounding_box
146
157
 
147
158
  def run_inference_on_image(image_path):
148
159
 
@@ -220,7 +231,7 @@ def upload_tiktok(video, description, hashtags=None, sound_name=None, sound_aud_
220
231
 
221
232
  retries = 0
222
233
  cookie_read = False
223
- install_js_dependencies()
234
+ oldQ = 'N.A'
224
235
 
225
236
  if os.path.exists('TK_cookies.json'):
226
237
  cookies, cookie_read = read_cookies(cookies_path='TK_cookies.json')
@@ -231,8 +242,9 @@ def upload_tiktok(video, description, hashtags=None, sound_name=None, sound_aud_
231
242
  cookie_read = False
232
243
 
233
244
  if cookie_read == False:
245
+ install_js_dependencies()
234
246
  login_warning()
235
- run_javascript()
247
+ result = run_javascript()
236
248
 
237
249
  cookies, cookie_read = read_cookies("TK_cookies.json")
238
250
  if cookie_read == False:
@@ -241,13 +253,12 @@ def upload_tiktok(video, description, hashtags=None, sound_name=None, sound_aud_
241
253
 
242
254
  with sync_playwright() as p:
243
255
 
244
- browser = p.firefox.launch(headless=True)
256
+ browser = p.webkit.launch(headless=False)
245
257
 
246
258
  context = browser.new_context()
247
259
  context.add_cookies(cookies)
248
260
  page = context.new_page()
249
261
  url = 'https://www.tiktok.com/tiktokstudio/upload?from=upload&lang=en'
250
- url2 = 'https://www.tiktok.com/tiktokstudio/content?tab=draft'
251
262
 
252
263
  while retries < 2:
253
264
  try:
@@ -279,24 +290,28 @@ def upload_tiktok(video, description, hashtags=None, sound_name=None, sound_aud_
279
290
  print("CAPTCHA DETECTED, Attempting to solve")
280
291
  solved = False
281
292
  attempts = 0
293
+ question = page.locator('div.VerifyBar___StyledDiv-sc-12zaxoy-0.hRJhHT').text_content()
282
294
  while solved == False:
283
295
  attempts += 1
284
- question = page.locator('div.VerifyBar___StyledDiv-sc-12zaxoy-0.hRJhHT').text_content()
296
+ start_time = time.time()
297
+ while question == oldQ:
298
+ question = page.locator('div.VerifyBar___StyledDiv-sc-12zaxoy-0.hRJhHT').text_content()
299
+ if time.time() - start_time > 2:
300
+ break
285
301
  if 'Select 2 objects that are the same' in question:
286
302
  found = False
287
303
  while found == False:
288
304
  page.click('span.secsdk_captcha_refresh--text')
289
- time.sleep(0.5)
290
305
  image = get_image_src(page)
291
306
  img_path = download_image(image)
292
307
  b_box, found = run_inference_on_image(image_path=img_path)
293
308
 
294
309
  with Image.open(img_path) as img:
295
310
  image_size = img.size
296
-
297
- image = page.locator('#captcha-verify-image')
298
- image.wait_for()
299
- box = image.bounding_box()
311
+
312
+ imageweb = page.locator('#captcha-verify-image')
313
+ imageweb.wait_for()
314
+ box = imageweb.bounding_box()
300
315
  image_x = box['x']
301
316
  image_y = box['y']
302
317
  image_height_web = box['height']
@@ -308,36 +323,39 @@ def upload_tiktok(video, description, hashtags=None, sound_name=None, sound_aud_
308
323
  time.sleep(0.5)
309
324
  if attempts > 5:
310
325
  sys.exit("FAILED TO SOLVE CAPTCHA")
311
- try:
312
- page.wait_for_selector('.upload-text-container', timeout=5000)
313
- os.remove('captcha_image.jpg')
314
- if suppressprint == False:
315
- print("Captcha Solved")
316
- solved = True
317
- except:
318
- continue
326
+ while showedup == False:
327
+ if page.locator("div.captcha_verify_message.captcha_verify_message-pass").is_visible():
328
+ solved = True
329
+ showedup = True
330
+ if page.locator("div.captcha_verify_message.captcha_verify_message-fail").is_visible():
331
+ showedup = True
332
+ oldQ = question
333
+ page.click('span.secsdk_captcha_refresh--text')
319
334
  else:
320
- found_prop = False
321
- while found_prop == False:
335
+ objectclick = understood_Qs(question)
336
+ while objectclick == 'N.A':
337
+ oldQ = question
322
338
  page.click('span.secsdk_captcha_refresh--text')
323
- time.sleep(0.5)
324
- question = page.locator('div.VerifyBar___StyledDiv-sc-12zaxoy-0.hRJhHT').text_content()
325
- objectclick = understood_Qs(question)
326
- while objectclick == 'N.A':
327
- page.click('span.secsdk_captcha_refresh--text')
328
- page.wait_for_selector('div.VerifyBar___StyledDiv-sc-12zaxoy-0.hRJhHT')
339
+ start_time = time.time()
340
+ runs = 0
341
+ while question == oldQ:
342
+ runs += 1
329
343
  question = page.locator('div.VerifyBar___StyledDiv-sc-12zaxoy-0.hRJhHT').text_content()
330
- objectclick = understood_Qs(question)
331
- image = get_image_src(page)
332
- img_path = download_image(image)
333
- b_box, found_prop = run_inference_on_image_tougher(image_path=img_path, object=objectclick)
334
-
344
+ if runs > 1:
345
+ time.sleep(1)
346
+ if time.time() - start_time > 2:
347
+ break
348
+ objectclick = understood_Qs(question)
349
+ image = get_image_src(page)
350
+ img_path = download_image(image)
351
+ b_box = run_inference_on_image_tougher(image_path=img_path, object=objectclick)
352
+
335
353
  with Image.open(img_path) as img:
336
354
  image_size = img.size
337
-
338
- image = page.locator('#captcha-verify-image')
339
- image.wait_for()
340
- box = image.bounding_box()
355
+
356
+ imageweb = page.locator('#captcha-verify-image')
357
+ imageweb.wait_for()
358
+ box = imageweb.bounding_box()
341
359
  image_x = box['x']
342
360
  image_y = box['y']
343
361
  image_height_web = box['height']
@@ -346,20 +364,22 @@ def upload_tiktok(video, description, hashtags=None, sound_name=None, sound_aud_
346
364
 
347
365
  webpage_coords = convert_to_webpage_coordinates(b_box, image_x, image_y, image_height_web, image_width_web, image_height_real, image_width_real)
348
366
 
349
-
350
367
  click_on_objects(page, webpage_coords)
351
- time.sleep(0.5)
352
368
  page.click("div.verify-captcha-submit-button")
353
- if attempts > 10:
369
+ if attempts > 20:
354
370
  sys.exit("FAILED TO SOLVE CAPTCHA")
355
- try:
356
- page.wait_for_selector('.upload-text-container', timeout=5000)
357
- solved = True
358
- os.remove('captcha_image.jpg')
359
- if suppressprint == False:
360
- print("Captcha Solved")
361
- except:
362
- continue
371
+ showedup = False
372
+ while showedup == False:
373
+ if page.locator("div.captcha_verify_message.captcha_verify_message-pass").is_visible():
374
+ solved = True
375
+ showedup = True
376
+ os.remove('captcha_image.jpg')
377
+ if suppressprint == False:
378
+ print("CAPTCHA SOLVED")
379
+ if page.locator("div.captcha_verify_message.captcha_verify_message-fail").is_visible():
380
+ showedup = True
381
+ oldQ = question
382
+ page.click('span.secsdk_captcha_refresh--text')
363
383
 
364
384
 
365
385
  try:
@@ -418,7 +438,7 @@ def upload_tiktok(video, description, hashtags=None, sound_name=None, sound_aud_
418
438
  time.sleep(0.2)
419
439
  if suppressprint == False:
420
440
  print("Tik tok done loading file onto servers")
421
-
441
+
422
442
  if schedule != None:
423
443
  try:
424
444
  hour = schedule[0:2]
@@ -465,7 +485,6 @@ def upload_tiktok(video, description, hashtags=None, sound_name=None, sound_aud_
465
485
  if (schedule == None) and (day != None):
466
486
  sys.exit("ERROR: CANT SCHEDULE FOR ANOTHER DAY USING 'day' WITHOUT ALSO INCLUDING TIME OF UPLOAD WITH 'schedule'; PLEASE ALSO INCLUDE TIME WITH 'schedule' PARAMETER")
467
487
 
468
-
469
488
  if(sound_name == None):
470
489
  if copyrightcheck == True:
471
490
  page.locator(".TUXSwitch-input").nth(0).click()